diff options
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index becfeec3bb..0acebc21f1 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3012,6 +3012,15 @@ static int mov_read_header(AVFormatContext *s) } export_orphan_timecode(s); + for (i = 0; i < s->nb_streams; i++) { + AVStream *st = s->streams[i]; + MOVStreamContext *sc = st->priv_data; + if(st->codec->codec_type == AVMEDIA_TYPE_AUDIO && st->codec->codec_id == CODEC_ID_AAC) { + sc->start_pad = 2112; + st->skip_samples = sc->start_pad; + } + } + if (mov->trex_data) { for (i = 0; i < s->nb_streams; i++) { AVStream *st = s->streams[i]; @@ -3187,7 +3196,10 @@ static int mov_read_seek(AVFormatContext *s, int stream_index, int64_t sample_ti seek_timestamp = st->index_entries[sample].timestamp; for (i = 0; i < s->nb_streams; i++) { + MOVStreamContext *sc = s->streams[i]->priv_data; st = s->streams[i]; + st->skip_samples = (sample_time <= 0) ? sc->start_pad : 0; + if (stream_index == i) continue; |