1 From 7d7ce18ff0d24b586634fa6e631fa0eec7865aae Mon Sep 17 00:00:00 2001
2 From: elupus <elupus@xbmc.org>
3 Date: Tue, 1 Nov 2011 20:18:35 +0100
4 Subject: [PATCH 13/13] add public version of ff_read_frame_flush
6 We need this since we sometimes seek on the
7 input stream behind ffmpeg's back. After this
8 all data need to be flushed completely.
10 Patch part of the XBMC patch set for ffmpeg, downloaded from
11 https://github.com/xbmc/FFmpeg/.
13 Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
15 libavformat/avformat.h | 5 +++++
16 libavformat/utils.c | 5 +++++
17 2 files changed, 10 insertions(+)
19 diff --git a/libavformat/avformat.h b/libavformat/avformat.h
20 index 2e54ed1..3a9f292 100644
21 --- a/libavformat/avformat.h
22 +++ b/libavformat/avformat.h
23 @@ -2121,6 +2121,11 @@ int av_find_best_stream(AVFormatContext *ic,
24 int av_read_frame(AVFormatContext *s, AVPacket *pkt);
27 + * Clear out any buffered data in context
29 +void av_read_frame_flush(AVFormatContext *s);
32 * Seek to the keyframe at timestamp.
33 * 'timestamp' in 'stream_index'.
35 diff --git a/libavformat/utils.c b/libavformat/utils.c
36 index f4fb172..10dda18 100644
37 --- a/libavformat/utils.c
38 +++ b/libavformat/utils.c
39 @@ -1624,6 +1624,11 @@ void ff_read_frame_flush(AVFormatContext *s)
43 +void av_read_frame_flush(AVFormatContext *s)
45 + ff_read_frame_flush(s);
48 void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp)