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 <dalecur...@chromium.org>
From 34d68a511a2d933b111964f84cfd2d0a289dec97 Mon Sep 17 00:00:00 2001
From: Dale Curtis <dalecur...@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 <dalecur...@chromium.org>
---
 libavformat/oggdec.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index 193a286e43..4ab7fdc0bd 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -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

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to