aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2009-04-05 13:02:47 +0000
committerMichael Niedermayer <michaelni@gmx.at>2009-04-05 13:02:47 +0000
commit300a3d0d00d65e55fb97f9ea00da7c80c9fa314f (patch)
treef8eb9337fef9040dc94d3bb49bcfc504e3545b0f
parent40fa514033aa6709bce49f70214a78ad3eab33eb (diff)
downloadffmpeg-300a3d0d00d65e55fb97f9ea00da7c80c9fa314f.tar.gz
Make sure the last bits of huffyuv frames are zeroed.
Fixes issue946 Originally committed as revision 18334 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/huffyuv.c2
-rw-r--r--tests/ffmpeg.regression.ref2
-rw-r--r--tests/rotozoom.regression.ref2
3 files changed, 4 insertions, 2 deletions
diff --git a/libavcodec/huffyuv.c b/libavcodec/huffyuv.c
index 51acf0570d..237b05fa94 100644
--- a/libavcodec/huffyuv.c
+++ b/libavcodec/huffyuv.c
@@ -1376,6 +1376,8 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
emms_c();
size+= (put_bits_count(&s->pb)+31)/8;
+ put_bits(&s->pb, 16, 0);
+ put_bits(&s->pb, 15, 0);
size/= 4;
if((s->flags&CODEC_FLAG_PASS1) && (s->picture_number&31)==0){
diff --git a/tests/ffmpeg.regression.ref b/tests/ffmpeg.regression.ref
index 259d8ca1b0..6c1d462245 100644
--- a/tests/ffmpeg.regression.ref
+++ b/tests/ffmpeg.regression.ref
@@ -66,7 +66,7 @@ df90a4c50f47577d8fc83a0184499266 *./tests/data/a-odivx.mp4
550787 ./tests/data/a-odivx.mp4
a1c691f3be526ecbf3be3152d5bab88c *./tests/data/mpeg4.vsynth.out.yuv
stddev: 7.99 PSNR: 30.06 bytes: 7603200/ 7603200
-6c58e5707afe056b072d2ce21b3b8e4f *./tests/data/a-huffyuv.avi
+190774e155fb7fabfdfb71dfc29c4f87 *./tests/data/a-huffyuv.avi
7933744 ./tests/data/a-huffyuv.avi
799d3db687f6cdd7a837ec156efc171f *./tests/data/huffyuv.vsynth.out.yuv
stddev: 0.00 PSNR:999.99 bytes: 7603200/ 7603200
diff --git a/tests/rotozoom.regression.ref b/tests/rotozoom.regression.ref
index 2e648935ba..2bd52c6e92 100644
--- a/tests/rotozoom.regression.ref
+++ b/tests/rotozoom.regression.ref
@@ -66,7 +66,7 @@ stddev: 1.91 PSNR: 42.49 bytes: 7603200/ 7603200
119797 ./tests/data/a-odivx.mp4
90a3577850239083a9042bef33c50e85 *./tests/data/mpeg4.rotozoom.out.yuv
stddev: 5.34 PSNR: 33.56 bytes: 7603200/ 7603200
-a1323da0c8b437cd6961f8c90451880b *./tests/data/a-huffyuv.avi
+56cd44907a48990e06bd065e189ff461 *./tests/data/a-huffyuv.avi
6455232 ./tests/data/a-huffyuv.avi
dde5895817ad9d219f79a52d0bdfb001 *./tests/data/huffyuv.rotozoom.out.yuv
stddev: 0.00 PSNR:999.99 bytes: 7603200/ 7603200