diff --git a/libavformat/isom.h b/libavformat/isom.h index ccfbd16534..6c6ad5459f 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -145,4 +145,6 @@ int ff_mp4_read_descr_len(ByteIOContext *pb); 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 */ 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