[vlc-devel] commit: Fix wrong initialization of 'mp2v' encoder profile (Roman Pen )
git version control
git at videolan.org
Sat Feb 28 11:54:32 CET 2009
vlc | branch: master | Roman Pen <r.peniaev at gmail.com> | Sat Feb 28 01:39:17 2009 +0100| [9be39f72dbafbeb94f6f1d3c1d2e46be5d2b3c93] | committer: 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 b1b72b632aed8ccf9624093214efe1329093e6f8.
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9be39f72dbafbeb94f6f1d3c1d2e46be5d2b3c93
---
modules/codec/avcodec/encoder.c | 3 ---
1 files changed, 0 insertions(+), 3 deletions(-)
diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 6cbe672..f5ffc01 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -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;
More information about the vlc-devel
mailing list