diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-07-15 01:20:38 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-07-15 01:20:44 +0200 |
commit | c9ea1f7fc5e92bacf0418ec3be78237827cb9fd1 (patch) | |
tree | 848a66d1d980550ed8c418ca7b98b7ef5b2c8c07 | |
parent | 47de8ccf426629a93f383ebcad2b7914b51a1f44 (diff) | |
parent | ba4cb43f0b94ad7a468d34c172a87c73c95243a7 (diff) | |
download | ffmpeg-c9ea1f7fc5e92bacf0418ec3be78237827cb9fd1.tar.gz |
Merge remote-tracking branch 'jamrial/release/1.2' into release/1.2
* jamrial/release/1.2:
oggparseskeleton: avoid header parsing failure
oggparseskeleton: Replace avpriv_report_missing_feature() with a normal av_log() call
oggparseskeleton: Fix fisbone header parsing
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/oggparseskeleton.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libavformat/oggparseskeleton.c b/libavformat/oggparseskeleton.c index b6959a6543..d94b0c2e07 100644 --- a/libavformat/oggparseskeleton.c +++ b/libavformat/oggparseskeleton.c @@ -37,6 +37,9 @@ static int skeleton_header(AVFormatContext *s, int idx) strcpy(st->codec->codec_name, "skeleton"); st->codec->codec_type = AVMEDIA_TYPE_DATA; + if ((os->flags & OGG_FLAG_EOS) && os->psize == 0) + return 1; + if (os->psize < 8) return -1; @@ -74,12 +77,16 @@ static int skeleton_header(AVFormatContext *s, int idx) target_idx = ogg_find_stream(ogg, AV_RL32(buf+12)); start_granule = AV_RL64(buf+36); + if (target_idx < 0) { + av_log(s, AV_LOG_WARNING, "Serial number in fisbone doesn't match any stream\n"); + return 1; + } + os = ogg->streams + target_idx; if (os->start_granule != OGG_NOGRANULE_VALUE) { - av_log_missing_feature(s, - "Multiple fisbone for the same stream", 0); + av_log(s, AV_LOG_WARNING, "Multiple fisbone for the same stream\n"); return 1; } - if (target_idx >= 0 && start_granule != OGG_NOGRANULE_VALUE) { + if (start_granule != OGG_NOGRANULE_VALUE) { os->start_granule = start_granule; } } |