aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2010-10-05 21:35:44 +0000
committerMartin Storsjö <martin@martin.st>2010-10-05 21:35:44 +0000
commitdc2cabd003d264644926b3b4326ed3792405f953 (patch)
tree9ee209ff6049e8e2b9c55effcf29dc0350fc24cc /libavformat/mov.c
parent6d3421498ee03d8445e40259162eb3f5a162377d (diff)
downloadffmpeg-dc2cabd003d264644926b3b4326ed3792405f953.tar.gz
movdec: Split out ff_mov_read_stsd
Originally committed as revision 25359 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 89fad78de3..8c65f4bf73 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -965,22 +965,17 @@ enum CodecID ff_mov_get_lpcm_codec_id(int bps, int flags)
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, ByteIOContext *pb, MOVAtom atom)
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;