You've already forked FFmpeg
							
							
				mirror of
				https://github.com/FFmpeg/FFmpeg.git
				synced 2025-10-30 23:18:11 +02:00 
			
		
		
		
	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.
This commit is contained in:
		| @@ -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); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user