summaryrefslogtreecommitdiff
path: root/libavformat/wtv.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/wtv.c')
-rw-r--r--libavformat/wtv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavformat/wtv.c b/libavformat/wtv.c
index 756ba93e7a..795ea39bf9 100644
--- a/libavformat/wtv.c
+++ b/libavformat/wtv.c
@@ -645,7 +645,9 @@ static AVStream * parse_media_type(AVFormatContext *s, AVStream *st, int sid,
if (!st)
return NULL;
if (!ff_guidcmp(formattype, format_waveformatex)) {
- ff_get_wav_header(pb, st->codec, size);
+ int ret = ff_get_wav_header(pb, st->codec, size);
+ if (ret < 0)
+ return NULL;
} else {
if (ff_guidcmp(formattype, format_none))
av_log(s, AV_LOG_WARNING, "unknown formattype:"FF_PRI_GUID"\n", FF_ARG_GUID(formattype));