[FFmpeg-devel] [PATCH 07/10] avcodec/libdav1d: Don't leak side-data-only packets

James Almer jamrial at gmail.com
Fri Oct 15 15:00:04 EEST 2021


On 10/11/2021 12:36 PM, Andreas Rheinhardt wrote:
> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
> ---
>   libavcodec/libdav1d.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/libavcodec/libdav1d.c b/libavcodec/libdav1d.c
> index 2807210e50..2d5fccec71 100644
> --- a/libavcodec/libdav1d.c
> +++ b/libavcodec/libdav1d.c
> @@ -328,6 +328,9 @@ static int libdav1d_receive_frame(AVCodecContext *c, AVFrame *frame)
>                       return res;
>                   }
>               }
> +        } else if (res >= 0) {
> +            av_packet_unref(&pkt);
> +            return AVERROR(EAGAIN);

Not exactly a real world scenario, but a valid one, so nice catch and lgtm.

>           }
>       }
>   
> 



More information about the ffmpeg-devel mailing list