[FFmpeg-cvslog] mjpegdec: handle the occurance of rstn emulation

Michael Niedermayer git at videolan.org
Wed Dec 26 20:56:05 CET 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 26 20:23:09 2012 +0100| [011169cd41ec6004a61611a9efba0b6778d78ff6] | committer: Michael Niedermayer

mjpegdec: handle the occurance of rstn emulation

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

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

 libavcodec/mjpegdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 2ad1e2d..71edc91 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -740,7 +740,7 @@ static void handle_rstn(MJpegDecodeContext *s, int nb_components)
 
         i = 8 + ((-get_bits_count(&s->gb)) & 7);
         /* skip RSTn */
-        if (show_bits(&s->gb, i) == (1 << i) - 1) {
+        if (s->restart_count == 0 && show_bits(&s->gb, i) == (1 << i) - 1) {
             int pos = get_bits_count(&s->gb);
             align_get_bits(&s->gb);
             while (get_bits_left(&s->gb) >= 8 && show_bits(&s->gb, 8) == 0xFF)



More information about the ffmpeg-cvslog mailing list