diff --git a/modules/video_filter/blend.cpp b/modules/video_filter/blend.cpp index 9161e653fb5ed358b5260d9dfca791d5c6cfacdc..63da1094906d522139655ceca2961b920dcce4f5 100644 --- a/modules/video_filter/blend.cpp +++ b/modules/video_filter/blend.cpp @@ -267,7 +267,7 @@ class CPictureRGBX : public CPicture { public: CPictureRGBX(const CPicture &cfg) : CPicture(cfg) { - if (GetPackedRgbIndexes(fmt, &offset_r, &offset_g, &offset_b, &offset_a) != VLC_SUCCESS) { + if (GetPackedRgbIndexes(fmt->i_chroma, &offset_r, &offset_g, &offset_b, &offset_a) != VLC_SUCCESS) { /* at least init to something on error to silence compiler warnings */ offset_r = 0; offset_g = 1; diff --git a/modules/video_filter/filter_picture.h b/modules/video_filter/filter_picture.h index 9bc3a32e19ac8fb47c495a50fc2feefeacd35b7d..8ce66a61e0c51fc50145e84d3443953a18f23fc2 100644 --- a/modules/video_filter/filter_picture.h +++ b/modules/video_filter/filter_picture.h @@ -90,10 +90,10 @@ static inline int GetPackedYuvOffsets( vlc_fourcc_t i_chroma, } } -static inline int GetPackedRgbIndexes( const video_format_t *p_fmt, int *i_r_index, +static inline int GetPackedRgbIndexes( vlc_fourcc_t fcc, int *i_r_index, int *i_g_index, int *i_b_index, int *i_a_index ) { - switch(p_fmt->i_chroma) + switch(fcc) { case VLC_CODEC_RGBA: *i_r_index = 0; diff --git a/modules/video_filter/sepia.c b/modules/video_filter/sepia.c index 396959b29b583ba4cde52dfb45bc5d8f169be910..3d230634d3df67efa1f1a7513a92e84e0015c65b 100644 --- a/modules/video_filter/sepia.c +++ b/modules/video_filter/sepia.c @@ -410,7 +410,7 @@ static void RVSepia( picture_t *p_pic, picture_t *p_outpic, int i_intensity ) p_pic->format.i_chroma != VLC_CODEC_BGR24; int i_rindex = 0, i_gindex = 1, i_bindex = 2, i_aindex = -1; - GetPackedRgbIndexes( &p_outpic->format, &i_rindex, &i_gindex, &i_bindex, &i_aindex ); + GetPackedRgbIndexes( p_outpic->format.i_chroma, &i_rindex, &i_gindex, &i_bindex, &i_aindex ); p_in = p_pic->p[0].p_pixels; p_in_end = p_in + p_pic->p[0].i_visible_lines