aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto Togni <r_togni@tiscali.it>2003-11-05 23:27:23 +0000
committerRoberto Togni <r_togni@tiscali.it>2003-11-05 23:27:23 +0000
commit1d768c3c169075cb33faab4cdff43df6a39acb68 (patch)
treeb1848490848f8dd7346e64026dec7742ef798a3f
parent19d053c5ba6c250ef8a9675bf803cb744085d2f1 (diff)
downloadffmpeg-1d768c3c169075cb33faab4cdff43df6a39acb68.tar.gz
100l: sometime palette was not copied to output frame
Originally committed as revision 2481 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r--libavcodec/msrle.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c
index dffd55bbb1..ce5c4c0a2e 100644
--- a/libavcodec/msrle.c
+++ b/libavcodec/msrle.c
@@ -67,6 +67,13 @@ static void msrle_decode_pal8(MsrleContext *s)
int row_ptr = (s->avctx->height - 1) * row_dec;
int frame_size = row_dec * s->avctx->height;
+ /* 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;
+ }
+
while (row_ptr >= 0) {
FETCH_NEXT_STREAM_BYTE();
rle_code = stream_byte;
@@ -128,13 +135,6 @@ static void msrle_decode_pal8(MsrleContext *s)
}
}
- /* 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;
- }
-
/* one last sanity check on the way out */
if (stream_ptr < s->size)
av_log(s->avctx, AV_LOG_ERROR, " MS RLE: ended frame decode with bytes left over (%d < %d)\n",