]> git.sesse.net Git - vlc/commitdiff
Fix wrong initialization of 'mp2v' encoder profile
authorRoman Pen <r.peniaev@gmail.com>
Sat, 28 Feb 2009 00:39:17 +0000 (01:39 +0100)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 28 Feb 2009 10:54:29 +0000 (12:54 +0200)
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 b1b72b632aed8ccf9624093214efe1329093e6f8.

Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
modules/codec/avcodec/encoder.c

index 6cbe672600edfda22cc1bb54d2b056ac74aa25a4..f5ffc016fe0243d9fbbc585061ded9cb79451ee7 100644 (file)
@@ -427,9 +427,6 @@ int OpenEncoder( vlc_object_t *p_this )
 
         p_context->width = p_enc->fmt_in.video.i_width;
         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.den = p_enc->fmt_in.video.i_frame_rate;