[FFmpeg-devel] [PATCH 1/2] avfilter/vf_colorkey: Add colorkey video filter
Nicolas George
george at nsup.org
Thu Jun 11 19:37:51 CEST 2015
Le tridi 23 prairial, an CCXXIII, Timo Rothenpieler a écrit :
> +static int offset_r(int fmt)
You can use the info in AVPixFmtDescriptor for these.
> + default:
> + return 0;
av_assert0(!"reached"); for the default case.
> + frame->format = convert_format(frame->format);
I am not sure this is legal. It would probably be wiser to allocate a new
frame.
> + outlink->format = convert_format(avctx->inputs[0]->format);
This is really not legal. You need to return EAGAIN from query_formats()
until the input format is known.
Or you can solve both problems at once by requiring alpha on the input
format and not doing any format change at all. I find that solution is the
best.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150611/d650e2d6/attachment.asc>
More information about the ffmpeg-devel
mailing list