From: Steven Liu <lingjiujianke@gmail.com> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH v2] avformat/hls: Fixed incorrect behaviour of default Date: Sun, 14 Jul 2024 20:04:42 +0800 Message-ID: <CADxeRwncK-gPLD76+GuPV5jTi5qb-LSra9Ss8EuNA0Ui7w-6MA@mail.gmail.com> (raw) In-Reply-To: <11d4dd69-f7f0-458a-a4da-fb6dc9a2f4f9@gmail.com> CoderVenkat <codervenkat@gmail.com> 于2024年7月14日周日 16:21写道: Hi Coder Venkat, > > Ping. > Any chance you could take a look? I would like to submit another fix based on this. @@ -1434,6 +1436,31 @@ static int create_master_playlist(AVFormatContext *s, avio_printf(hls->m3u8_out, ",INSTREAM-ID=\"%s\"\n", ccs->instreamid); } + /* Check only one default is present in a group */ + for (i = 0; i < hls->nb_varstreams; i++) { + vs = &(hls->var_streams[i]); + for (j = 0; j < hls->nb_varstreams; j++) { + if (i != j) { + temp_vs = &(hls->var_streams[j]); + if (vs->agroup && temp_vs->agroup && + !vs->has_video && !temp_vs->has_video) { + if (!av_strcasecmp(vs->agroup, temp_vs->agroup) && + vs->is_default && temp_vs->is_default) { + av_log(s, AV_LOG_ERROR, "Two streams in an agroup can not be default\n"); + goto fail; + } + } else if (vs->sgroup && temp_vs->sgroup && + !vs->has_video && !temp_vs->has_video) { + if (!av_strcasecmp(vs->sgroup, temp_vs->sgroup) && + vs->is_default && temp_vs->is_default) { + av_log(s, AV_LOG_ERROR, "Two streams in an sgroup can not be default\n"); + goto fail; + } + } + } + } + } + /* For audio only variant streams add #EXT-X-MEDIA tag with attributes*/ for (i = 0; i < hls->nb_varstreams; i++) { vs = &(hls->var_streams[i]); @@ -1452,7 +1479,7 @@ static int create_master_playlist(AVFormatContext Can these logic be optimized? for example, audio in one for logic, subtitle in the other for logic. > Thanks, > vckt > Thanks Steven _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2024-07-14 12:05 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-07-05 13:27 [FFmpeg-devel] [PATCH] avformat/hls: Fixed incorrect behaviour of default setting, , added autoselect and forced CoderVenkat 2024-07-07 10:18 ` Steven Liu 2024-07-08 13:43 ` [FFmpeg-devel] [PATCH v2] avformat/hls: Fixed incorrect behaviour of default CoderVenkat 2024-07-14 8:21 ` CoderVenkat 2024-07-14 12:04 ` Steven Liu [this message] 2024-07-14 15:16 ` [FFmpeg-devel] [PATCH v3] " CoderVenkat 2024-07-14 16:06 ` CoderVenkat 2024-07-15 13:47 ` Steven Liu 2024-07-16 10:59 ` Steven Liu
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CADxeRwncK-gPLD76+GuPV5jTi5qb-LSra9Ss8EuNA0Ui7w-6MA@mail.gmail.com \ --to=lingjiujianke@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git