summaryrefslogtreecommitdiff
path: root/libavformat/westwood_vqa.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/westwood_vqa.c')
-rw-r--r--libavformat/westwood_vqa.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/westwood_vqa.c b/libavformat/westwood_vqa.c
index 708f3e5fc3..c996dad8a2 100644
--- a/libavformat/westwood_vqa.c
+++ b/libavformat/westwood_vqa.c
@@ -233,7 +233,8 @@ static int wsvqa_read_packet(AVFormatContext *s,
switch (chunk_type) {
case SND1_TAG:
/* unpacked size is stored in header */
- pkt->duration = AV_RL16(pkt->data) / wsvqa->channels;
+ if(pkt->data)
+ pkt->duration = AV_RL16(pkt->data) / wsvqa->channels;
break;
case SND2_TAG:
/* 2 samples/byte, 1 or 2 samples per frame depending on stereo */