diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-05-09 06:35:13 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-05-09 17:37:47 +0200 |
commit | 0982b0a431060039517b35af7eae14dbf1c2ce10 (patch) | |
tree | 0558d0a49a3c562baf35f74f633eff2134680942 /libavresample/utils.c | |
parent | b1f9be543687b837069be88428f798ac8ca28e8e (diff) | |
download | ffmpeg-0982b0a431060039517b35af7eae14dbf1c2ce10.tar.gz |
lavr: make avresample_read() with NULL output discard samples.
Diffstat (limited to 'libavresample/utils.c')
-rw-r--r-- | libavresample/utils.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavresample/utils.c b/libavresample/utils.c index f54dcc6ae6..e533760abc 100644 --- a/libavresample/utils.c +++ b/libavresample/utils.c @@ -385,6 +385,8 @@ int avresample_available(AVAudioResampleContext *avr) int avresample_read(AVAudioResampleContext *avr, void **output, int nb_samples) { + if (!output) + return av_audio_fifo_drain(avr->out_fifo, nb_samples); return av_audio_fifo_read(avr->out_fifo, output, nb_samples); } |