diff mbox series

[FFmpeg-devel] avcodec/v4l2_m2m: Remove unnecessary unref before frame_free

Message ID tencent_A6523A45C2C1B56868D203296A567D5AAD0A@qq.com
State New
Headers show
Series [FFmpeg-devel] avcodec/v4l2_m2m: Remove unnecessary unref before frame_free | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Zhao Zhili Dec. 17, 2023, 5:09 a.m. UTC
From: Zhao Zhili <zhilizhao@tencent.com>

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
---
 libavcodec/v4l2_m2m.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Andreas Rheinhardt Dec. 18, 2023, 10:33 p.m. UTC | #1
Zhao Zhili:
> From: Zhao Zhili <zhilizhao@tencent.com>
> 
> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
> ---
>  libavcodec/v4l2_m2m.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/libavcodec/v4l2_m2m.c b/libavcodec/v4l2_m2m.c
> index 602efb7a16..bac3eb0588 100644
> --- a/libavcodec/v4l2_m2m.c
> +++ b/libavcodec/v4l2_m2m.c
> @@ -255,7 +255,6 @@ static void v4l2_m2m_destroy_context(void *opaque, uint8_t *context)
>  
>      if (s->fd >= 0)
>          close(s->fd);
> -    av_frame_unref(s->frame);
>      av_frame_free(&s->frame);
>      av_packet_unref(&s->buf_pkt);
>  

Reminds me of
https://patchwork.ffmpeg.org/project/ffmpeg/patch/AS8P250MB07441537D335E4657926DF368FC5A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM/

- Andreas
Zhao Zhili Dec. 19, 2023, 2:28 a.m. UTC | #2
> On Dec 19, 2023, at 06:33, Andreas Rheinhardt <andreas.rheinhardt@outlook.com> wrote:
> 
> Zhao Zhili:
>> From: Zhao Zhili <zhilizhao@tencent.com>
>> 
>> Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
>> ---
>> libavcodec/v4l2_m2m.c | 1 -
>> 1 file changed, 1 deletion(-)
>> 
>> diff --git a/libavcodec/v4l2_m2m.c b/libavcodec/v4l2_m2m.c
>> index 602efb7a16..bac3eb0588 100644
>> --- a/libavcodec/v4l2_m2m.c
>> +++ b/libavcodec/v4l2_m2m.c
>> @@ -255,7 +255,6 @@ static void v4l2_m2m_destroy_context(void *opaque, uint8_t *context)
>> 
>>     if (s->fd >= 0)
>>         close(s->fd);
>> -    av_frame_unref(s->frame);
>>     av_frame_free(&s->frame);
>>     av_packet_unref(&s->buf_pkt);
>> 
> 
> Reminds me of
> https://patchwork.ffmpeg.org/project/ffmpeg/patch/AS8P250MB07441537D335E4657926DF368FC5A@AS8P250MB0744.EURP250.PROD.OUTLOOK.COM/

Then please push.

> 
> - Andreas
> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org <mailto:ffmpeg-devel@ffmpeg.org>
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org <mailto:ffmpeg-devel-request@ffmpeg.org> with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libavcodec/v4l2_m2m.c b/libavcodec/v4l2_m2m.c
index 602efb7a16..bac3eb0588 100644
--- a/libavcodec/v4l2_m2m.c
+++ b/libavcodec/v4l2_m2m.c
@@ -255,7 +255,6 @@  static void v4l2_m2m_destroy_context(void *opaque, uint8_t *context)
 
     if (s->fd >= 0)
         close(s->fd);
-    av_frame_unref(s->frame);
     av_frame_free(&s->frame);
     av_packet_unref(&s->buf_pkt);