[FFmpeg-devel] [PATCH] use skip_put_bytes in mjpegenc.c

Reimar Döffinger Reimar.Doeffinger
Wed Sep 30 12:22:35 CEST 2009


Hello,
obviously much simpler.
Index: libavcodec/mjpegenc.c
===================================================================
--- libavcodec/mjpegenc.c       (revision 20091)
+++ libavcodec/mjpegenc.c       (working copy)
@@ -313,11 +313,8 @@
 
     if(ff_count==0) return;
 
-    /* skip put bits */
-    for(i=0; i<ff_count-3; i+=4)
-        put_bits(&s->pb, 32, 0);
-    put_bits(&s->pb, (ff_count-i)*8, 0);
     flush_put_bits(&s->pb);
+    skip_put_bytes(&s->pb, ff_count);
 
     for(i=size-1; ff_count; i--){
         int v= buf[i];




More information about the ffmpeg-devel mailing list