Skip to content

Commit

Permalink
add public version of ff_read_frame_flush
Browse files Browse the repository at this point in the history
We need this since we sometimes seek on the
input stream behind ffmpeg's back. After this
all data need to be flushed completely.
  • Loading branch information
elupus authored and fritsch committed Sep 14, 2014
1 parent 298c35c commit c12ccb7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libavformat/avformat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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'.
Expand Down
5 changes: 5 additions & 0 deletions libavformat/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c12ccb7

Please sign in to comment.