[FFmpeg-cvslog] lavfi: copy palette in start_frame()
Stefano Sabatini
git at videolan.org
Thu May 24 01:02:44 CEST 2012
ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Sat Apr 7 09:49:39 2012 +0200| [fce30d8d736f5a77512c7b0b231438062fd12581] | committer: Stefano Sabatini
lavfi: copy palette in start_frame()
Fix -vf copy with pal8 format.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fce30d8d736f5a77512c7b0b231438062fd12581
---
libavfilter/video.c | 4 ++++
1 file changed, 4 insertions(+)
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;
More information about the ffmpeg-cvslog
mailing list