summaryrefslogtreecommitdiff
path: root/libavformat/mov.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2016-01-08 14:23:11 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2016-01-08 14:52:53 +0100
commit47cd85e1e5b116312f5a8738e61c550ab91b6db8 (patch)
treef80f29b0e28218519e5ea264af6a013b560d46fe /libavformat/mov.c
parent6f1466dc527208db70bd608784b9223da8f44b9e (diff)
avformat/mov: Simplify format checking code
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r--libavformat/mov.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index f6462f7a2b..98c2f51931 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1812,16 +1812,9 @@ static void mov_parse_stsd_audio(MOVContext *c, AVIOContext *pb,
AVStream *st, MOVStreamContext *sc)
{
int bits_per_sample, flags;
- uint32_t format;
- uint16_t version;
+ uint16_t version = avio_rb16(pb);
AVDictionaryEntry *compatible_brands = av_dict_get(c->fc->metadata, "compatible_brands", NULL, AV_DICT_MATCH_CASE);
- avio_seek(pb, -12, SEEK_CUR);
- format = avio_rb32(pb);
- avio_seek(pb, 8, SEEK_CUR);
-
- version = avio_rb16(pb);
-
avio_rb16(pb); /* revision level */
avio_rb32(pb); /* vendor */
@@ -1870,7 +1863,7 @@ static void mov_parse_stsd_audio(MOVContext *c, AVIOContext *pb,
}
}
- if (format == 0) {
+ if (sc->format == 0) {
if (st->codec->bits_per_coded_sample == 8)
st->codec->codec_id = mov_codec_id(st, MKTAG('r','a','w',' '));
else if (st->codec->bits_per_coded_sample == 16)