summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Stembridge <jstembridge@users.sourceforge.net>2003-04-25 17:31:31 +0000
committerJames Stembridge <jstembridge@users.sourceforge.net>2003-04-25 17:31:31 +0000
commitb760609cb77fb2145ff8f16627d929ac190a480e (patch)
tree6f55ff88e49b9e3d1008f3caf278e8b22ee548ef /src
parentf7f8d3a29c728e074b806b03f1140b030ae8737d (diff)
downloadxine-lib-b760609cb77fb2145ff8f16627d929ac190a480e.tar.gz
xine-lib-b760609cb77fb2145ff8f16627d929ac190a480e.tar.bz2
prevent avcodec_flush_buffers from corrupting memory when decoding mjpeg
CVS patchset: 4676 CVS date: 2003/04/25 17:31:31
Diffstat (limited to 'src')
-rw-r--r--src/libffmpeg/libavcodec/utils.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libffmpeg/libavcodec/utils.c b/src/libffmpeg/libavcodec/utils.c
index 5e1fbee17..8face129f 100644
--- a/src/libffmpeg/libavcodec/utils.c
+++ b/src/libffmpeg/libavcodec/utils.c
@@ -565,11 +565,13 @@ void avcodec_flush_buffers(AVCodecContext *avctx)
MpegEncContext *s = avctx->priv_data;
switch(avctx->codec_id){
+ case CODEC_ID_MJPEG:
+ case CODEC_ID_MJPEGB:
+ if(avctx->codec->priv_data_size != sizeof(MpegEncContext))
+ break;
case CODEC_ID_MPEG1VIDEO:
case CODEC_ID_H263:
case CODEC_ID_RV10:
- case CODEC_ID_MJPEG:
- case CODEC_ID_MJPEGB:
case CODEC_ID_MPEG4:
case CODEC_ID_MSMPEG4V1:
case CODEC_ID_MSMPEG4V2: