diff --git a/libavformat/avformat.h b/libavformat/avformat.h index b915148ad7830..64695c600dfb6 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -2111,6 +2111,11 @@ int av_read_packet(AVFormatContext *s, AVPacket *pkt); */ int av_read_frame(AVFormatContext *s, AVPacket *pkt); +/** + * Clear out any buffered data in context + */ +void av_read_frame_flush(AVFormatContext *s); + /** * Seek to the keyframe at timestamp. * 'timestamp' in 'stream_index'. diff --git a/libavformat/utils.c b/libavformat/utils.c index 9f743133141d8..8de7c3d3b04b6 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -1580,6 +1580,11 @@ void ff_read_frame_flush(AVFormatContext *s) } } +void av_read_frame_flush(AVFormatContext *s) +{ + ff_read_frame_flush(s); +} + void ff_update_cur_dts(AVFormatContext *s, AVStream *ref_st, int64_t timestamp) { int i;