diff mbox series

[FFmpeg-devel,1/2] ffmpeg: unref ist->filter_frame in the only place it's used

Message ID 20211119154856.44240-1-jamrial@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/2] ffmpeg: unref ist->filter_frame in the only place it's used | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

James Almer Nov. 19, 2021, 3:48 p.m. UTC
Signed-off-by: James Almer <jamrial@gmail.com>
---
 fftools/ffmpeg.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fftools/ffmpeg.c b/fftools/ffmpeg.c
index e88ca554ae..a67f489cda 100644
--- a/fftools/ffmpeg.c
+++ b/fftools/ffmpeg.c
@@ -2326,6 +2326,7 @@  static int send_frame_to_filters(InputStream *ist, AVFrame *decoded_frame)
             break;
         }
     }
+    av_frame_unref(ist->filter_frame);
     return ret;
 }
 
@@ -2385,7 +2386,6 @@  static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output,
     ist->nb_samples = decoded_frame->nb_samples;
     err = send_frame_to_filters(ist, decoded_frame);
 
-    av_frame_unref(ist->filter_frame);
     av_frame_unref(decoded_frame);
     return err < 0 ? err : ret;
 }
@@ -2511,7 +2511,6 @@  static int decode_video(InputStream *ist, AVPacket *pkt, int *got_output, int64_
     err = send_frame_to_filters(ist, decoded_frame);
 
 fail:
-    av_frame_unref(ist->filter_frame);
     av_frame_unref(decoded_frame);
     return err < 0 ? err : ret;
 }