[FFmpeg-cvslog] r25359 - in trunk/libavformat: isom.h mov.c

mstorsjo subversion
Tue Oct 5 23:35:44 CEST 2010


Author: mstorsjo
Date: Tue Oct  5 23:35:44 2010
New Revision: 25359

Log:
movdec: Split out ff_mov_read_stsd

Modified:
   trunk/libavformat/isom.h
   trunk/libavformat/mov.c

Modified: trunk/libavformat/isom.h
==============================================================================
--- trunk/libavformat/isom.h	Tue Oct  5 23:05:07 2010	(r25358)
+++ trunk/libavformat/isom.h	Tue Oct  5 23:35:44 2010	(r25359)
@@ -145,4 +145,6 @@ int ff_mp4_read_descr_len(ByteIOContext 
 int ff_mov_read_esds(AVFormatContext *fc, ByteIOContext *pb, MOVAtom atom);
 enum CodecID ff_mov_get_lpcm_codec_id(int bps, int flags);
 
+int ff_mov_read_stsd_entries(MOVContext *c, ByteIOContext *pb, int entries);
+
 #endif /* AVFORMAT_ISOM_H */

Modified: trunk/libavformat/mov.c
==============================================================================
--- trunk/libavformat/mov.c	Tue Oct  5 23:05:07 2010	(r25358)
+++ trunk/libavformat/mov.c	Tue Oct  5 23:35:44 2010	(r25359)
@@ -965,22 +965,17 @@ enum CodecID ff_mov_get_lpcm_codec_id(in
     return CODEC_ID_NONE;
 }
 
-static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
+int ff_mov_read_stsd_entries(MOVContext *c, ByteIOContext *pb, int entries)
 {
     AVStream *st;
     MOVStreamContext *sc;
-    int j, entries, pseudo_stream_id;
+    int j, pseudo_stream_id;
 
     if (c->fc->nb_streams < 1)
         return 0;
     st = c->fc->streams[c->fc->nb_streams-1];
     sc = st->priv_data;
 
-    get_byte(pb); /* version */
-    get_be24(pb); /* flags */
-
-    entries = get_be32(pb);
-
     for(pseudo_stream_id=0; pseudo_stream_id<entries; pseudo_stream_id++) {
         //Parsing Sample description table
         enum CodecID id;
@@ -1300,6 +1295,17 @@ static int mov_read_stsd(MOVContext *c, 
     return 0;
 }
 
+static int mov_read_stsd(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
+{
+    int entries;
+
+    get_byte(pb); /* version */
+    get_be24(pb); /* flags */
+    entries = get_be32(pb);
+
+    return ff_mov_read_stsd_entries(c, pb, entries);
+}
+
 static int mov_read_stsc(MOVContext *c, ByteIOContext *pb, MOVAtom atom)
 {
     AVStream *st;



More information about the ffmpeg-cvslog mailing list