1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Merge remote-tracking branch 'qatar/master'

* qatar/master:
  lavr: fix missing " in header documentation
  aviobuf: Discard old buffered, previously read data in ffio_read_partial

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-01-04 13:29:09 +01:00
commit a08194b4c5
2 changed files with 8 additions and 1 deletions

View File

@ -538,6 +538,13 @@ int ffio_read_partial(AVIOContext *s, unsigned char *buf, int size)
len = s->buf_end - s->buf_ptr;
if (len == 0) {
/* Reset the buf_end pointer to the start of the buffer, to make sure
* the fill_buffer call tries to read as much data as fits into the
* full buffer, instead of just what space is left after buf_end.
* This avoids returning partial packets at the end of the buffer,
* for packet based inputs.
*/
s->buf_end = s->buf_ptr = s->buffer;
fill_buffer(s);
len = s->buf_end - s->buf_ptr;
}

View File

@ -49,7 +49,7 @@
* av_opt_set_int(avr, "in_sample_rate", 48000, 0);
* av_opt_set_int(avr, "out_sample_rate", 44100, 0);
* av_opt_set_int(avr, "in_sample_fmt", AV_SAMPLE_FMT_FLTP, 0);
* av_opt_set_int(avr, "out_sample_fmt, AV_SAMPLE_FMT_S16, 0);
* av_opt_set_int(avr, "out_sample_fmt", AV_SAMPLE_FMT_S16, 0);
* @endcode
*
* Once the context is initialized, it must be opened with avresample_open(). If