Commit 9be39f72 authored by Roman Pen's avatar Roman Pen Committed by Rémi Denis-Courmont

Fix wrong initialization of 'mp2v' encoder profile

According to ffmpeg/libavcodec/mpeg12enc.c:155 (rev:2fd06be07311)
profile and level must be inited at the same time, so, -1 will be
returned for mp2v with width > 720 or height > 576. But, if we leave
this fields blank (i.e. FF_PROFILE_UNKNOWN and FF_LEVEL_UNKNOWN) avcodec
will init them correctly.

This partially reverts commit b1b72b63.
Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent e5eff32d
...@@ -427,9 +427,6 @@ int OpenEncoder( vlc_object_t *p_this ) ...@@ -427,9 +427,6 @@ int 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 */
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;
p_context->time_base.den = p_enc->fmt_in.video.i_frame_rate; p_context->time_base.den = p_enc->fmt_in.video.i_frame_rate;
......
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