[FFmpeg-devel] [PATCH] swscale: check flags instead of nb_components to find if pixel format have alpha
Paul B Mahol
onemda at gmail.com
Fri Jan 25 14:14:45 CET 2013
On 1/24/13, Stefano Sabatini <stefasab at gmail.com> wrote:
> On date Thursday 2013-01-24 17:34:06 +0000, Paul B Mahol encoded:
>> Signed-off-by: Paul B Mahol <onemda at gmail.com>
>> ---
>> libswscale/swscale_internal.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libswscale/swscale_internal.h
>> b/libswscale/swscale_internal.h
>> index d1f9539..4f4b953 100644
>> --- a/libswscale/swscale_internal.h
>> +++ b/libswscale/swscale_internal.h
>> @@ -688,7 +688,7 @@ static av_always_inline int isALPHA(enum AVPixelFormat
>> pix_fmt)
>> {
>> const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
>> av_assert0(desc);
>> - return desc->nb_components == 2 || desc->nb_components == 4;
>> + return desc->flags & PIX_FMT_ALPHA;
>
> Should be OK if FATE is happy.
applied
> --
> FFmpeg = Fierce and Friendly Merciful Prodigious Educated Gladiator
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
More information about the ffmpeg-devel
mailing list