[vlc-commits] swscale: do not clobber input format
Rémi Denis-Courmont
git at videolan.org
Tue Apr 12 23:37:13 CEST 2016
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Apr 13 00:35:57 2016 +0300| [290a87aec3b782e924bbb6d31773bc1b47b08ef0] | committer: Rémi Denis-Courmont
swscale: do not clobber input format
Conversion filters cannot change their input formats; the core fixes it
when probing the module.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=290a87aec3b782e924bbb6d31773bc1b47b08ef0
---
modules/video_chroma/swscale.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/modules/video_chroma/swscale.c b/modules/video_chroma/swscale.c
index f18017e..d0e3a9b 100644
--- a/modules/video_chroma/swscale.c
+++ b/modules/video_chroma/swscale.c
@@ -594,13 +594,9 @@ static void Convert( filter_t *p_filter, struct SwsContext *ctx,
p_src, i_plane_count, b_swap_uvi );
if( p_filter->fmt_in.video.i_chroma == VLC_CODEC_RGBP )
{
- video_palette_t *src_pal =
- p_src->format.p_palette ?
- p_src->format.p_palette :
- p_filter->fmt_in.video.p_palette;
memset( palette, 0, sizeof(palette) );
- if( src_pal )
- memcpy( palette, src_pal->palette,
+ if( p_filter->fmt_in.video.p_palette )
+ memcpy( palette, p_filter->fmt_in.video.p_palette->palette,
__MIN( sizeof(video_palette_t), AVPALETTE_SIZE ) );
src[1] = palette;
src_stride[1] = 4;
More information about the vlc-commits
mailing list