summaryrefslogtreecommitdiff
path: root/libavresample
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-05-09 06:36:29 +0200
committerAnton Khirnov <anton@khirnov.net>2012-05-09 17:38:23 +0200
commit9684341346fd5aad436325529cade47966c4731b (patch)
tree6e7eb85234d0880ba7b7e6c6ca0d9a5fccd37d59 /libavresample
parent0982b0a431060039517b35af7eae14dbf1c2ce10 (diff)
downloadffmpeg-9684341346fd5aad436325529cade47966c4731b.tar.gz
lavr: do not try to copy to uninitialized output audio data.
This would happen at least when lavr is used as a fifo with no conversion.
Diffstat (limited to 'libavresample')
-rw-r--r--libavresample/utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavresample/utils.c b/libavresample/utils.c
index e533760abc..6d4509d7c1 100644
--- a/libavresample/utils.c
+++ b/libavresample/utils.c
@@ -375,7 +375,8 @@ int avresample_convert(AVAudioResampleContext *avr, void **output,
}
}
- return handle_buffered_output(avr, &output_buffer, current_buffer);
+ return handle_buffered_output(avr, output ? &output_buffer : NULL,
+ current_buffer);
}
int avresample_available(AVAudioResampleContext *avr)