[FFmpeg-devel] [PATCH v2] avcodec: add realtime bitstream filter

James Almer jamrial at gmail.com
Sun May 5 06:42:26 EEST 2019


On 5/4/2019 12:06 PM, Moritz Barsnick wrote:
> On Fri, May 03, 2019 at 23:47:47 -0300, James Almer wrote:
>> The flush() callback exists to reset the bsf into its initial state
>> without the need to destroy and recreate the context.
>> For example, some decoders auto-insert certain bitstream filters that
> [...]
>> avcodec_flush_buffers(), which must be called every time seeking needs
>> to be done in a decoding scenario, flushes both the decoder and said
>> bitstream filters.
> 
> Thanks for the explanation!
> 
>> I guess the simplest way would be to auto insert this bsf into some
>> decoder (AVCodec.bsfs string), then seek using some libavcodec based
>> application that doesn't already decodes at realtime.
> 
> It doesn't sound simple, but I'll try to construct a test and fix the
> code. Meanwhile, this version of the patch is withdrawn.

As long as the flush() callback leaves the bsf context in the same state
as if it was fresh out of an alloc/init call, it should be good and
doing what's expected from it. So don't worry much about writing a
custom test for it.

> 
> Thanks,
> Moritz
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
> 



More information about the ffmpeg-devel mailing list