[vlc-commits] avcodec: fix mpeg-1 encoding

Jean-Baptiste Kempf git at videolan.org
Fri Jun 8 11:10:47 CEST 2012


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Jun  8 11:07:54 2012 +0200| [b617ab5f1ee19b599a0a88fa77bbe00849d5df84] | committer: Jean-Baptiste Kempf

avcodec: fix mpeg-1 encoding

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b617ab5f1ee19b599a0a88fa77bbe00849d5df84
---

 modules/codec/avcodec/encoder.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/codec/avcodec/encoder.c b/modules/codec/avcodec/encoder.c
index 36cee2d..75e5382 100644
--- a/modules/codec/avcodec/encoder.c
+++ b/modules/codec/avcodec/encoder.c
@@ -220,6 +220,12 @@ int OpenEncoder( vlc_object_t *p_this )
         i_codec_id = CODEC_ID_MP2;
         psz_namecodec = "MPEG I/II Layer 2";
     }
+    else if( p_enc->fmt_out.i_codec == VLC_CODEC_MP1V )
+    {
+        i_cat = VIDEO_ES;
+        i_codec_id = CODEC_ID_MPEG1VIDEO;
+        psz_namecodec = "MPEG-1 video";
+    }
     else if( !GetFfmpegCodec( p_enc->fmt_out.i_codec, &i_cat, &i_codec_id,
                              &psz_namecodec ) )
     {
@@ -466,8 +472,7 @@ int OpenEncoder( vlc_object_t *p_this )
         p_context->b_frame_strategy = 0;
         if( !p_context->max_b_frames  &&
             (  p_enc->fmt_out.i_codec == VLC_CODEC_MPGV ||
-               p_enc->fmt_out.i_codec == VLC_CODEC_MP2V ||
-               p_enc->fmt_out.i_codec == VLC_CODEC_MP1V ) )
+               p_enc->fmt_out.i_codec == VLC_CODEC_MP2V ) )
             p_context->flags |= CODEC_FLAG_LOW_DELAY;
 
         if( p_enc->fmt_out.i_codec == VLC_CODEC_MP2V )



More information about the vlc-commits mailing list