[FFmpeg-devel] [PATCH] avcodec: add a bsf to reorder DTS into PTS
Anton Khirnov
anton at khirnov.net
Wed Sep 28 18:39:01 EEST 2022
Quoting James Almer (2022-09-23 16:27:32)
> On 9/23/2022 10:06 AM, Anton Khirnov wrote:
> >> +static int dts2pts_filter(AVBSFContext *ctx, AVPacket *out)
> >> +{
> >> + DTS2PTSContext *s = ctx->priv_data;
> >> + DTS2PTSNode *poc_node = NULL, *next[2] = { NULL, NULL };
> >> + DTS2PTSFrame frame;
> >> + int ret;
> >> +
> >> + // Fill up the FIFO and POC tree
> >> + if (!s->eof && av_fifo_can_write(s->fifo)) {
> >
> > More than one packet can be available, so this should probably be a
> > loop.
>
> What do you mean? AVBSFContext can contain at most one buffered packet.
I'd prefer if filters didn't make any such assumptions.
--
Anton Khirnov
More information about the ffmpeg-devel
mailing list