Commit b1b72b63 authored by Christophe Massiot's avatar Christophe Massiot

* modules/codec/ffmpeg/encoder.c: MPEG compliance fixes for large pictures

   and low delay streams.
parent bb5f959c
...@@ -389,6 +389,9 @@ int E_(OpenEncoder)( vlc_object_t *p_this ) ...@@ -389,6 +389,9 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
p_context->width = p_enc->fmt_in.video.i_width; p_context->width = p_enc->fmt_in.video.i_width;
p_context->height = p_enc->fmt_in.video.i_height; p_context->height = p_enc->fmt_in.video.i_height;
if( p_enc->fmt_out.i_codec == VLC_FOURCC('m', 'p', '2', 'v')
&& (p_context->width > 720 || p_context->height > 576) )
p_context->level = 4; /* High level */
#if LIBAVCODEC_BUILD >= 4754 #if LIBAVCODEC_BUILD >= 4754
p_context->time_base.num = p_enc->fmt_in.video.i_frame_rate_base; p_context->time_base.num = p_enc->fmt_in.video.i_frame_rate_base;
...@@ -420,6 +423,8 @@ int E_(OpenEncoder)( vlc_object_t *p_this ) ...@@ -420,6 +423,8 @@ int E_(OpenEncoder)( vlc_object_t *p_this )
p_context->max_b_frames = p_context->max_b_frames =
__MAX( __MIN( p_sys->i_b_frames, FF_MAX_B_FRAMES ), 0 ); __MAX( __MIN( p_sys->i_b_frames, FF_MAX_B_FRAMES ), 0 );
p_context->b_frame_strategy = 0; p_context->b_frame_strategy = 0;
if( !p_context->max_b_frames )
p_context->flags |= CODEC_FLAG_LOW_DELAY;
#if LIBAVCODEC_BUILD >= 4687 #if LIBAVCODEC_BUILD >= 4687
av_reduce( &i_aspect_num, &i_aspect_den, av_reduce( &i_aspect_num, &i_aspect_den,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment