summaryrefslogtreecommitdiff
path: root/fftools/ffmpeg.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-11-19 17:29:33 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-11-20 00:07:47 +0100
commita132614bba247afac30d3a8b1378c40bd7f672bc (patch)
tree57d2272a40bca7cc6a494f008d79e7f8c27ecd17 /fftools/ffmpeg.h
parent01923579f477ede876c1611844efa970aa928392 (diff)
fftools/ffmpeg: Avoid temporary frame
send_frame_to_filters() sends a frame to all the filters that need said frame; for every filter except the last one this involves creating a reference to the frame, because av_buffersrc_add_frame_flags() by default takes ownership of the supplied references. Yet said function has a flag which changes its behaviour to create a reference itself. This commit uses this flag and stops creating the references itself; this allows to remove the spare AVFrame holding the temporary references; it also avoids unreferencing said frame. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'fftools/ffmpeg.h')
-rw-r--r--fftools/ffmpeg.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h
index e86ab61047..1728010f56 100644
--- a/fftools/ffmpeg.h
+++ b/fftools/ffmpeg.h
@@ -311,7 +311,6 @@ typedef struct InputStream {
AVCodecContext *dec_ctx;
const AVCodec *dec;
AVFrame *decoded_frame;
- AVFrame *filter_frame; /* a ref of decoded_frame, to be sent to filters */
AVPacket *pkt;
int64_t prev_pkt_pts;