Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-05-08 03:28:07 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-05-08 04:25:17 +0300
commit3a4d387195a5eb3c1700071af8d8150e4f7f6600 (patch)
tree8017e7564ec1d51342c00ff0dcc041d87d0f9639 /libavcodec/ffv1dec.c
parent8b1f66cf5c2e4d29ae06cdf3f12cdd3d808006bd (diff)
avcodec/ffv1dec: Fix copying planes of paletted formats
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/ffv1dec.c')
-rw-r--r--libavcodec/ffv1dec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 1a50767171..c3f43b838d 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -898,7 +898,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
const uint8_t *src[4];
uint8_t *dst[4];
ff_thread_await_progress(&f->last_picture, INT_MAX, 0);
- for (j = 0; j < 4; j++) {
+ for (j = 0; j < desc->nb_components; j++) {
int pixshift = desc->comp[j].depth > 8;
int sh = (j == 1 || j == 2) ? f->chroma_h_shift : 0;
int sv = (j == 1 || j == 2) ? f->chroma_v_shift : 0;
@@ -906,6 +906,12 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
(fs->slice_y >> sv) + ((fs->slice_x >> sh) << pixshift);
src[j] = f->last_picture.f->data[j] + f->last_picture.f->linesize[j] *
(fs->slice_y >> sv) + ((fs->slice_x >> sh) << pixshift);
+
+ }
+ if (desc->flags & AV_PIX_FMT_FLAG_PAL ||
+ desc->flags & AV_PIX_FMT_FLAG_PSEUDOPAL) {
+ dst[1] = p->data[1];
+ src[1] = f->last_picture.f->data[1];
}
av_image_copy(dst, p->linesize, src,
f->last_picture.f->linesize,