[FFmpeg-cvslog] r18785 - trunk/libavcodec/msrle.c
bcoudurier
subversion
Sun May 10 21:10:38 CEST 2009
Author: bcoudurier
Date: Sun May 10 21:10:37 2009
New Revision: 18785
Log:
check for palette presence, fix crash with QT-BMP.mov, issue #1074
Modified:
trunk/libavcodec/msrle.c
Modified: trunk/libavcodec/msrle.c
==============================================================================
--- trunk/libavcodec/msrle.c Sun May 10 16:44:09 2009 (r18784)
+++ trunk/libavcodec/msrle.c Sun May 10 21:10:37 2009 (r18785)
@@ -79,12 +79,14 @@ static int msrle_decode_frame(AVCodecCon
return -1;
}
+ if (s->avctx->palctrl) {
/* make the palette available */
memcpy(s->frame.data[1], s->avctx->palctrl->palette, AVPALETTE_SIZE);
if (s->avctx->palctrl->palette_changed) {
s->frame.palette_has_changed = 1;
s->avctx->palctrl->palette_changed = 0;
}
+ }
ff_msrle_decode(avctx, (AVPicture*)&s->frame, avctx->bits_per_coded_sample, buf, buf_size);
More information about the ffmpeg-cvslog
mailing list