aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/sp5xdec.c
diff options
context:
space:
mode:
authorVladimir Voroshilov <voroshil@gmail.com>2007-10-13 17:38:58 +0000
committerVladimir Voroshilov <voroshil@gmail.com>2007-10-13 17:38:58 +0000
commit3c3704d28179e533e2f42a20e3234827b3f52685 (patch)
treee94a57ec72b323f890ba4ac1cea38d987333791a /libavcodec/sp5xdec.c
parent4d570f94ba055d75f469aacadfccf0bdffcbae6c (diff)
downloadffmpeg-3c3704d28179e533e2f42a20e3234827b3f52685.tar.gz
Fix MJPEG decoder for AMV files.
Since decoding is doing from the end and aligned by 16 previous code worked correctly only when picture height was dividable by 16, otherwise it provides garbage in top lines and truncates bottom. New code adjusts data[] pointers taking in account alignment issue. Originally committed as revision 10727 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/sp5xdec.c')
-rw-r--r--libavcodec/sp5xdec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/sp5xdec.c b/libavcodec/sp5xdec.c
index ada46ca353..104ed31b7b 100644
--- a/libavcodec/sp5xdec.c
+++ b/libavcodec/sp5xdec.c
@@ -87,6 +87,7 @@ static int sp5x_decode_frame(AVCodecContext *avctx,
recoded[j++] = 0xFF;
recoded[j++] = 0xD9;
+ avctx->flags &= ~CODEC_FLAG_EMU_EDGE;
i = ff_mjpeg_decode_frame(avctx, data, data_size, recoded, j);
av_free(recoded);
@@ -207,6 +208,5 @@ AVCodec amv_decoder = {
ff_mjpeg_decode_init,
NULL,
ff_mjpeg_decode_end,
- sp5x_decode_frame,
- CODEC_CAP_DR1
+ sp5x_decode_frame
};