[FFmpeg-cvslog] oggparseskeleton: Fix fisbone header parsing

James Almer git at videolan.org
Mon Jul 15 02:29:22 CEST 2013


ffmpeg | branch: release/1.2 | James Almer <jamrial at gmail.com> | Sat Jul  6 04:34:13 2013 -0300| [ce11d9490cc2e89b62734cc6c5b58a9f90fdd27f] | committer: James Almer

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 at gmx.at>
(cherry picked from commit 3960992f0abf8e28acada220c79fb754d67298ba)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ce11d9490cc2e89b62734cc6c5b58a9f90fdd27f
---

 libavformat/oggparseskeleton.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/libavformat/oggparseskeleton.c b/libavformat/oggparseskeleton.c
index b6959a6..719e065 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) {
             av_log_missing_feature(s,
                                    "Multiple fisbone for the same stream", 0);
             return 1;
         }
-        if (target_idx >= 0 && start_granule != OGG_NOGRANULE_VALUE) {
+        if (start_granule != OGG_NOGRANULE_VALUE) {
             os->start_granule = start_granule;
         }
     }



More information about the ffmpeg-cvslog mailing list