diff --git a/ffmpeg.c b/ffmpeg.c index f557f95e10..3711c99cc5 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -1871,14 +1871,14 @@ static int transcode_video(InputStream *ist, AVPacket *pkt, int *got_output, int #if CONFIG_AVFILTER for(i=0;isample_aspect_ratio.num) - decoded_frame->sample_aspect_ratio = ist->st->sample_aspect_ratio; - decoded_frame->pts = ist->pts; + OutputStream *ost = ost = &output_streams[i]; + if(check_output_constraints(ist, ost)){ + if (!decoded_frame->sample_aspect_ratio.num) + decoded_frame->sample_aspect_ratio = ist->st->sample_aspect_ratio; + decoded_frame->pts = ist->pts; - av_vsrc_buffer_add_frame(ost->input_video_filter, decoded_frame, AV_VSRC_BUF_FLAG_OVERWRITE); - } + av_vsrc_buffer_add_frame(ost->input_video_filter, decoded_frame, AV_VSRC_BUF_FLAG_OVERWRITE); + } } #endif