[FFmpeg-devel] [PATCH] avcodec/cuviddec: use AVCodec.bsfs to filter packets

James Almer jamrial at gmail.com
Mon Mar 2 15:15:20 EET 2020


On 3/2/2020 7:35 AM, Anton Khirnov wrote:
> Quoting James Almer (2020-03-01 04:00:25)
> [...]
>> +    if (avctx->codec->bsfs) {
>> +        const AVBSFContext *bsf = avctx->internal->filter.bsfs[avctx->internal->filter.nb_bsfs - 1];
> 
> yuck
> 
> I guess it's acceptable for now, but we'll want to get rid of that in
> the future. Might be tricky though...
> 
> Patch looks good otherwise.

I tried in f631c328e6. Long story short, it was a disaster, since
AVCodecContext.extradata is supposedly owned by the caller in decoding
scenarios, and some projects started crashing because of it. Had to be
reverted in 87588caf8c. So any solution will have to be internal but
less ugly, or an API change.


More information about the ffmpeg-devel mailing list