[FFmpeg-cvslog] mpeg12enc: Correctly mask dimensions

Michael Niedermayer git at videolan.org
Sun Jan 20 04:39:53 CET 2013


ffmpeg | branch: release/1.0 | Michael Niedermayer <michaelni at gmx.at> | Mon Jan  7 15:31:58 2013 +0100| [5af41713046efed635d202a2d9b641c626561d71] | committer: Michael Niedermayer

mpeg12enc: Correctly mask dimensions

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit bcc4ef1a415c2ae646fdc4a8e22ebe0205f270e6)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5af41713046efed635d202a2d9b641c626561d71
---

 libavcodec/mpeg12enc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mpeg12enc.c b/libavcodec/mpeg12enc.c
index ff839c0..9726a30 100644
--- a/libavcodec/mpeg12enc.c
+++ b/libavcodec/mpeg12enc.c
@@ -214,8 +214,8 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s)
             /* mpeg1 header repeated every gop */
             put_header(s, SEQ_START_CODE);
 
-            put_sbits(&s->pb, 12, s->width );
-            put_sbits(&s->pb, 12, s->height);
+            put_sbits(&s->pb, 12, s->width  & 0xFFF);
+            put_sbits(&s->pb, 12, s->height & 0xFFF);
 
             for(i=1; i<15; i++){
                 float error= aspect_ratio;



More information about the ffmpeg-cvslog mailing list