[FFmpeg-devel] [PATCH 06/42] avcodec/vp8: Use RefStruct API for seg_map
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Mon Oct 2 13:04:02 EEST 2023
Anton Khirnov:
> Quoting Andreas Rheinhardt (2023-09-19 21:56:58)
>> @@ -139,11 +138,7 @@ static int vp8_ref_frame(VP8Context *s, VP8Frame *dst, const VP8Frame *src)
>>
>> if ((ret = ff_thread_ref_frame(&dst->tf, &src->tf)) < 0)
>> return ret;
>> - if (src->seg_map &&
>> - !(dst->seg_map = av_buffer_ref(src->seg_map))) {
>> - vp8_release_frame(s, dst);
>> - return AVERROR(ENOMEM);
>> - }
>> + ff_refstruct_replace(&dst->seg_map, src->seg_map);
>
> It seems misleading to use replace rather than ref when dst is clean at
> this point.
>
This is done with an eye towards 37/42, in which vp8_ref_frame() will be
replaced by vp8_replace_frame().
> Otherwise looks ok.
>
More information about the ffmpeg-devel
mailing list