From 34d68a511a2d933b111964f84cfd2d0a289dec97 Mon Sep 17 00:00:00 2001
From: Dale Curtis <dalecurtis@chromium.org>
Date: Tue, 28 Nov 2017 13:40:20 -0800
Subject: [PATCH] Respect AVERROR codes returned by ogg header parsing.
Fixes ticket #6804. All of the ogg header parsers may return
standard AVERROR codes; these return values should not be
treated as success.
Signed-off-by: Dale Curtis <dalecurtis@chromium.org>
---
libavformat/oggdec.c | 3 +++
1 file changed, 3 insertions(+)
@@ -544,6 +544,9 @@ static int ogg_packet(AVFormatContext *s, int *sid, int *dstart, int *dsize,
if (os->header) {
os->header = os->codec->header(s, idx);
+ if (os->header < 0)
+ return os->header;
+
if (!os->header) {
os->segp = segp;
os->psize = psize;
--
2.15.0.417.g466bffb3ac-goog
Fixes ticket #6804. All of the ogg header parsers may return standard AVERROR codes; these return values should not be treated as success. Signed-off-by: Dale Curtis <dalecurtis@chromium.org>