diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-06-02 15:43:21 +0200 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-06-06 01:35:27 +0200 |
commit | 27bcf55f459e038e81f09c17e72e6d44898b9015 (patch) | |
tree | 34ba7668ad2c828fc1ff087901e5b59fbee3d030 /ffmpeg.c | |
parent | 612d0782fc885aaa0bbb8f8966d425ea91a606cf (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.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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]); |