diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-04-07 09:49:39 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-05-24 00:54:16 +0200 |
commit | fce30d8d736f5a77512c7b0b231438062fd12581 (patch) | |
tree | 151482b8cfe14d9a0aa9386174b14b1eeaac9d5c /libavfilter/video.c | |
parent | f2ee0656389a6f9db348ce59c4fbb3c58dd648af (diff) | |
download | ffmpeg-streaming-fce30d8d736f5a77512c7b0b231438062fd12581.zip ffmpeg-streaming-fce30d8d736f5a77512c7b0b231438062fd12581.tar.gz |
lavfi: copy palette in start_frame()
Fix -vf copy with pal8 format.
Diffstat (limited to 'libavfilter/video.c')
-rw-r--r-- | libavfilter/video.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavfilter/video.c b/libavfilter/video.c index 5c750ff..87a206c 100644 --- a/libavfilter/video.c +++ b/libavfilter/video.c @@ -230,6 +230,10 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) link->cur_buf = avfilter_get_video_buffer(link, dst->min_perms, link->w, link->h); link->src_buf = picref; avfilter_copy_buffer_ref_props(link->cur_buf, link->src_buf); + + /* copy palette if required */ + if (av_pix_fmt_descriptors[link->format].flags & PIX_FMT_PAL) + memcpy(link->cur_buf->data[1], link->src_buf-> data[1], AVPALETTE_SIZE); } else link->cur_buf = picref; |