Quoting Andreas Rheinhardt (2024-08-10 01:52:36) > Anton Khirnov: > > @@ -3442,12 +3448,15 @@ static int hevc_receive_frame(AVCodecContext > > *avctx, AVFrame *frame) > > if (ret < 0) > > return ret; > > > > - if (s->output_frame->buf[0]) { > > - av_frame_move_ref(frame, s->output_frame); > > +do_output: > > + if (ff_container_fifo_read(s->output_fifo, frame) >= 0) { > > This looks like it adds a (several) av_frame_move_ref() for the common > case in which we only have one output frame. Can't this be avoided?
Does it? Current code has av_frame_ref() into HEVCContext.output_frame, which is then av_frame_move_ref()'d into the actual output frame. New code does the same, except with a few more wrappers. > > diff --git a/libavcodec/hevc/hevcdec.h b/libavcodec/hevc/hevcdec.h > > index da4d83e661..f2705b8de2 100644 > > --- a/libavcodec/hevc/hevcdec.h > > +++ b/libavcodec/hevc/hevcdec.h > > @@ -31,6 +31,7 @@ > > #include "libavcodec/avcodec.h" > > #include "libavcodec/bswapdsp.h" > > #include "libavcodec/cabac.h" > > +#include "libavcodec/container_fifo.h" > > Unnecessary. Just use struct ContainerFifo* below. Sure, changed locally. -- Anton Khirnov _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".