X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ffmpeg.c;h=12c7a2891f6da365f72ce187e3d2e2adffc8ceaf;hb=6202cf5dd8095abbdf1930faf09900edecafcda4;hp=17a7eab46d1976b292d1dcf617784d31aa6fa049;hpb=9df00574fca16b3c8aa9892f9a3ed5bd6482833a;p=ffmpeg diff --git a/ffmpeg.c b/ffmpeg.c index 17a7eab46d1..12c7a2891f6 100644 --- a/ffmpeg.c +++ b/ffmpeg.c @@ -482,7 +482,7 @@ static void exit_program(void) av_frame_free(&input_streams[i]->filter_frame); av_dict_free(&input_streams[i]->opts); avsubtitle_free(&input_streams[i]->prev_sub.subtitle); - avcodec_free_frame(&input_streams[i]->sub2video.frame); + av_frame_free(&input_streams[i]->sub2video.frame); av_freep(&input_streams[i]->filters); av_freep(&input_streams[i]); } @@ -2341,6 +2341,13 @@ static int transcode_init(void) ost->frame_aspect_ratio ? // overridden by the -aspect cli option av_d2q(ost->frame_aspect_ratio * codec->height/codec->width, 255) : ost->filter->filter->inputs[0]->sample_aspect_ratio; + if (!strncmp(ost->enc->name, "libx264", 7) && + codec->pix_fmt == AV_PIX_FMT_NONE && + ost->filter->filter->inputs[0]->format != AV_PIX_FMT_YUV420P) + av_log(NULL, AV_LOG_INFO, + "No pixel format specified, %s for H.264 encoding chosen.\n" + "Use -pix_fmt yuv420p for compatibility with outdated media players.\n", + av_get_pix_fmt_name(ost->filter->filter->inputs[0]->format)); codec->pix_fmt = ost->filter->filter->inputs[0]->format; if (!icodec ||