Message ID | bb3e1e2f-621e-3866-5a75-47804a7b23b7@gyani.pro |
---|---|
State | Accepted |
Commit | 3ba5eef2c7b21a1af48d8d9ccb58f2ed4ebc874a |
Headers | show |
On 29-12-2018 04:40 PM, Gyan wrote:
> -vn/-an/-sn/-dn now work for inputs
Ping.
On 02-01-2019 10:49 AM, Gyan wrote: > > On 29-12-2018 04:40 PM, Gyan wrote: >> -vn/-an/-sn/-dn now work for inputs > > Ping. Plan to push tonight if no objections. Gyan
On Sat, Dec 29, 2018 at 04:40:34PM +0530, Gyan wrote: > -vn/-an/-sn/-dn now work for inputs > > Gyan. > > ffmpeg_opt.c | 7 +++++++ > 1 file changed, 7 insertions(+) > 80740bd4538cc641b429476a77cb3b98f16cc41d 0002-ffmpeg-allow-disabling-streams-by-type-for-inputs.patch > From b6efe47010cda7b9d53d7464d68f5c63d0df7ff7 Mon Sep 17 00:00:00 2001 > From: Gyan Doshi <ffmpeg@gyani.pro> > Date: Sat, 29 Dec 2018 16:19:09 +0530 > Subject: [PATCH 2/2] ffmpeg: allow disabling streams by type for inputs > > -vn/-an/-sn/-dn now works for input. Streams are still registered in > input_streams but they can't be automatically selected or mapped or > filtered. > --- > fftools/ffmpeg_opt.c | 7 +++++++ > 1 file changed, 7 insertions(+) LGTM thanks [...]
On 03-01-2019 03:37 PM, Michael Niedermayer wrote: > ffmpeg_opt.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> 80740bd4538cc641b429476a77cb3b98f16cc41d 0002-ffmpeg-allow-disabling-streams-by-type-for-inputs.patch >> From b6efe47010cda7b9d53d7464d68f5c63d0df7ff7 Mon Sep 17 00:00:00 2001 >> From: Gyan Doshi <ffmpeg@gyani.pro> >> Date: Sat, 29 Dec 2018 16:19:09 +0530 >> Subject: [PATCH 2/2] ffmpeg: allow disabling streams by type for inputs >> >> -vn/-an/-sn/-dn now works for input. Streams are still registered in >> input_streams but they can't be automatically selected or mapped or >> filtered. >> --- >> fftools/ffmpeg_opt.c | 7 +++++++ >> 1 file changed, 7 insertions(+) > LGTM Pushed as 3ba5eef2c7b21a1af48d8d9ccb58f2ed4ebc874a Thanks, Gyan
diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 4ee7dbbe01..5350aaa4cb 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -760,6 +760,13 @@ static void add_input_streams(OptionsContext *o, AVFormatContext *ic) MATCH_PER_STREAM_OPT(discard, str, discard_str, ic, st); ist->user_set_discard = AVDISCARD_NONE; + + if ((o->video_disable && ist->st->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) || + (o->audio_disable && ist->st->codecpar->codec_type == AVMEDIA_TYPE_AUDIO) || + (o->subtitle_disable && ist->st->codecpar->codec_type == AVMEDIA_TYPE_SUBTITLE) || + (o->data_disable && ist->st->codecpar->codec_type == AVMEDIA_TYPE_DATA)) + ist->user_set_discard = AVDISCARD_ALL; + if (discard_str && av_opt_eval_int(&cc, discard_opt, discard_str, &ist->user_set_discard) < 0) { av_log(NULL, AV_LOG_ERROR, "Error parsing discard %s.\n", discard_str);
-vn/-an/-sn/-dn now work for inputs Gyan. From b6efe47010cda7b9d53d7464d68f5c63d0df7ff7 Mon Sep 17 00:00:00 2001 From: Gyan Doshi <ffmpeg@gyani.pro> Date: Sat, 29 Dec 2018 16:19:09 +0530 Subject: [PATCH 2/2] ffmpeg: allow disabling streams by type for inputs -vn/-an/-sn/-dn now works for input. Streams are still registered in input_streams but they can't be automatically selected or mapped or filtered. --- fftools/ffmpeg_opt.c | 7 +++++++ 1 file changed, 7 insertions(+)