---
 libavcodec/dpcm.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/libavcodec/dpcm.c b/libavcodec/dpcm.c
index 7f62b45..9b2fc25 100644
--- a/libavcodec/dpcm.c
+++ b/libavcodec/dpcm.c
@@ -179,8 +179,10 @@ static int dpcm_decode_frame(AVCodecContext *avctx, void 
*data, int *data_size,
     int st = s->channels - 1;
     int16_t *output_samples = data;
 
-    if (!buf_size)
+    if (!buf_size || !buf) {
+        *data_size = 0;
         return 0;
+    }
 
     /* calculate output size */
     switch(avctx->codec->id) {
-- 
1.7.1

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to