1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-23 21:54:53 +02:00

avformat/aviobuf: fix avio_flush() for read streams

avio_flush() did nothing useful for read streams. Fix it to behave as
expected, and discard the currently read buffer properly.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
wm4
2014-09-30 18:46:48 +02:00
committed by Michael Niedermayer
parent 07de0db74b
commit c8422f04a3
2 changed files with 9 additions and 3 deletions

View File

@@ -289,10 +289,14 @@ int url_feof(AVIOContext *s);
int avio_printf(AVIOContext *s, const char *fmt, ...) av_printf_format(2, 3);
/**
* Force flushing of buffered data to the output s.
* Force flushing of buffered data.
*
* Force the buffered data to be immediately written to the output,
* For write streams, force the buffered data to be immediately written to the output,
* without to wait to fill the internal buffer.
*
* For read streams, discard all currently buffered data, and advance the
* reported file position to that of the underlying stream. This does not
* read new data, and does not perform any seeks.
*/
void avio_flush(AVIOContext *s);