aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2013-07-06 04:34:13 -0300
committerMichael Niedermayer <michaelni@gmx.at>2013-07-06 13:30:51 +0200
commit3960992f0abf8e28acada220c79fb754d67298ba (patch)
tree146430d09828991c252f0cc51b1b4553dde8863a /libavformat
parent2aa2b4ac6555bb4af3f3542c88e7710eca1a57c0 (diff)
downloadffmpeg-3960992f0abf8e28acada220c79fb754d67298ba.tar.gz
oggparseskeleton: Fix fisbone header parsing
start_granule should be applied to the stream referenced in the fisbone packet, not to the Skeleton stream. This was broken in d1f05dd18375f2f8e68372edee11436927e43ba8 and produced bogus warnings about multiple fisbone in the same stream on files with more than one stream. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/oggparseskeleton.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libavformat/oggparseskeleton.c b/libavformat/oggparseskeleton.c
index 307387d065..ddabc2222c 100644
--- a/libavformat/oggparseskeleton.c
+++ b/libavformat/oggparseskeleton.c
@@ -74,12 +74,17 @@ 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) {
avpriv_report_missing_feature(s,
"Multiple fisbone for the same stream");
return 1;
}
- if (target_idx >= 0 && start_granule != OGG_NOGRANULE_VALUE) {
+ if (start_granule != OGG_NOGRANULE_VALUE) {
os->start_granule = start_granule;
}
}