* @see avresample_convert()
*
* @param avr audio resample context
- * @param output output data pointers
+ * @param output output data pointers. May be NULL, in which case
+ * nb_samples of data is discarded from output FIFO.
* @param nb_samples number of samples to read from the FIFO
* @return the number of samples written to output
*/
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);
}
#define LIBAVRESAMPLE_VERSION_MAJOR 0
#define LIBAVRESAMPLE_VERSION_MINOR 0
-#define LIBAVRESAMPLE_VERSION_MICRO 1
+#define LIBAVRESAMPLE_VERSION_MICRO 2
#define LIBAVRESAMPLE_VERSION_INT AV_VERSION_INT(LIBAVRESAMPLE_VERSION_MAJOR, \
LIBAVRESAMPLE_VERSION_MINOR, \