aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-04-20 22:09:04 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-20 22:12:08 +0200
commit3cd6f4546ad9334c2f4b234ad370225e4ae717b1 (patch)
treea2a1769645efa83874ba7d52ac1b6c6770c58cc9
parenta5379d6e68cbdd894941d7962e72af890d41d1b7 (diff)
parent656e31ed8728b0c095d037dc9764fc8137c87200 (diff)
downloadffmpeg-3cd6f4546ad9334c2f4b234ad370225e4ae717b1.tar.gz
Merge commit '656e31ed8728b0c095d037dc9764fc8137c87200'
* commit '656e31ed8728b0c095d037dc9764fc8137c87200': ogg: Forward errors further Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/oggdec.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libavformat/oggdec.c b/libavformat/oggdec.c
index efe060f998..72d96e829c 100644
--- a/libavformat/oggdec.c
+++ b/libavformat/oggdec.c
@@ -584,10 +584,9 @@ static int ogg_packet(AVFormatContext *s, int *sid, int *dstart, int *dsize,
static int ogg_get_length(AVFormatContext *s)
{
struct ogg *ogg = s->priv_data;
- int i;
+ int i, ret;
int64_t size, end;
int streams_left=0;
- int ret;
if (!s->pb->seekable)
return 0;
@@ -707,7 +706,11 @@ static int ogg_read_header(AVFormatContext *s)
}
//linear granulepos seek from end
- ogg_get_length(s);
+ ret = ogg_get_length(s);
+ if (ret < 0) {
+ ogg_read_close(s);
+ return ret;
+ }
return 0;
}