diff options
Diffstat (limited to 'libavformat/mp3dec.c')
-rw-r--r-- | libavformat/mp3dec.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c index 639c78d405..8745f209d3 100644 --- a/libavformat/mp3dec.c +++ b/libavformat/mp3dec.c @@ -219,8 +219,10 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st, mp3->start_pad = v>>12; mp3-> end_pad = v&4095; st->skip_samples = mp3->start_pad + 528 + 1; - if (mp3->frames) - st->end_discard_sample = -mp3->end_pad + 528 + 1 + mp3->frames * (int64_t)spf; + if (mp3->frames) { + st->first_discard_sample = -mp3->end_pad + 528 + 1 + mp3->frames * (int64_t)spf; + st->last_discard_sample = mp3->frames * (int64_t)spf; + } if (!st->start_time) st->start_time = av_rescale_q(st->skip_samples, (AVRational){1, c->sample_rate}, |