diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2002-11-06 11:59:17 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-11-06 11:59:17 +0000 |
commit | 218baf10f879caad63ad5eac42c4e18b2123f0d3 (patch) | |
tree | 84904ddbc50c7cd7e3b8140da490e1f3ac759681 /libavcodec | |
parent | 81ada1ce9d5025dd939262e604bc23feb6946c25 (diff) | |
download | ffmpeg-streaming-218baf10f879caad63ad5eac42c4e18b2123f0d3.zip ffmpeg-streaming-218baf10f879caad63ad5eac42c4e18b2123f0d3.tar.gz |
cleanup
Originally committed as revision 1173 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/mjpeg.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/libavcodec/mjpeg.c b/libavcodec/mjpeg.c index 3a5459f..8b167a1 100644 --- a/libavcodec/mjpeg.c +++ b/libavcodec/mjpeg.c @@ -470,11 +470,11 @@ void mjpeg_picture_header(MpegEncContext *s) put_bits(&s->pb, 8, 0); /* Ah/Al (not used) */ } -static void escape_FF(MpegEncContext *s) +static void escape_FF(MpegEncContext *s, int start) { - int size= get_bit_count(&s->pb) - s->header_bits; + int size= get_bit_count(&s->pb) - start*8; int i, ff_count; - uint8_t *buf= s->pb.buf + (s->header_bits>>3); + uint8_t *buf= s->pb.buf + start; int align= (-(int)(buf))&3; assert((size&7) == 0); @@ -533,7 +533,9 @@ void mjpeg_picture_trailer(MpegEncContext *s) put_bits(&s->pb, pad,0xFF>>(8-pad)); flush_put_bits(&s->pb); - escape_FF(s); + assert((s->header_bits&7)==0); + + escape_FF(s, s->header_bits>>3); put_marker(&s->pb, EOI); } |