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>
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;