summaryrefslogtreecommitdiff
path: root/ffmpeg.c
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2011-06-02 15:43:21 +0200
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2011-06-06 01:35:27 +0200
commit27bcf55f459e038e81f09c17e72e6d44898b9015 (patch)
tree34ba7668ad2c828fc1ff087901e5b59fbee3d030 /ffmpeg.c
parent612d0782fc885aaa0bbb8f8966d425ea91a606cf (diff)
vsrc_buffer: add flags param to av_vsrc_buffer_add_video_buffer_ref
The new flags parameter allows to specify if the video ref to add should overwrite the cache, if the flag is not set vsrc_buffer will complain and abort; otherwise it will clean the already cached video ref before to overwrite it, thus avoiding a leak.
Diffstat (limited to 'ffmpeg.c')
-rw-r--r--ffmpeg.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/ffmpeg.c b/ffmpeg.c
index fb619e7777..b18224b039 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1691,7 +1691,8 @@ static int output_packet(AVInputStream *ist, int ist_index,
picture.sample_aspect_ratio = ist->st->sample_aspect_ratio;
picture.pts = ist->pts;
- av_vsrc_buffer_add_frame(ost->input_video_filter, &picture);
+ av_vsrc_buffer_add_frame(ost->input_video_filter,
+ &picture, AV_VSRC_BUF_FLAG_OVERWRITE);
}
frame_available = ist->st->codec->codec_type != AVMEDIA_TYPE_VIDEO ||
!ost->output_video_filter || avfilter_poll_frame(ost->output_video_filter->inputs[0]);