[FFmpeg-devel] [PATCH] Revert "avcodec/vp9_superframe_bsf: cache packets by creating new references rather than moving them"
wm4
nfxjfg at googlemail.com
Sat Mar 24 14:19:03 EET 2018
On Fri, 23 Mar 2018 22:26:08 -0300
James Almer <jamrial at gmail.com> wrote:
> This reverts commit 7a02b364b68c0bf7f065f5c217fae458f0efdb8d.
>
> The packet fetched by ff_bsf_get_packet() and ff_bsf_get_packet_ref()
> is now guaranteed to be reference counted.
> ---
> libavcodec/vp9_superframe_bsf.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/libavcodec/vp9_superframe_bsf.c b/libavcodec/vp9_superframe_bsf.c
> index 2ea49c672d..52569ab097 100644
> --- a/libavcodec/vp9_superframe_bsf.c
> +++ b/libavcodec/vp9_superframe_bsf.c
> @@ -147,9 +147,7 @@ static int vp9_superframe_filter(AVBSFContext *ctx, AVPacket *out)
> goto done;
> }
>
> - res = av_packet_ref(s->cache[s->n_cache++], in);
> - if (res < 0)
> - goto done;
> + av_packet_move_ref(s->cache[s->n_cache++], in);
>
> if (invisible) {
> res = AVERROR(EAGAIN);
LGTM
More information about the ffmpeg-devel
mailing list