diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-03-20 11:20:54 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-03-20 14:12:53 -0400 |
commit | cd2ffb67ad9e9fec1766c501ad33e85dc934eeed (patch) | |
tree | 2469570e0240ee0e4bb4e9cf6a58e8a7f14ad704 /libavformat/xa.c | |
parent | 1d10afd581a4e6310ac146b270863ffe5e8635f2 (diff) | |
download | ffmpeg-cd2ffb67ad9e9fec1766c501ad33e85dc934eeed.tar.gz |
xa: fix timestamp calculation
The packet duration is always 28 samples.
Diffstat (limited to 'libavformat/xa.c')
-rw-r--r-- | libavformat/xa.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavformat/xa.c b/libavformat/xa.c index c5e5cf5864..82b703f8c5 100644 --- a/libavformat/xa.c +++ b/libavformat/xa.c @@ -38,7 +38,6 @@ typedef struct MaxisXADemuxContext { uint32_t out_size; uint32_t sent_bytes; - uint32_t audio_frame_counter; } MaxisXADemuxContext; static int xa_probe(AVProbeData *p) @@ -87,6 +86,7 @@ static int xa_read_header(AVFormatContext *s) st->codec->bits_per_coded_sample = avio_rl16(pb); avpriv_set_pts_info(st, 64, 1, st->codec->sample_rate); + st->start_time = 0; return 0; } @@ -111,9 +111,7 @@ static int xa_read_packet(AVFormatContext *s, pkt->stream_index = st->index; xa->sent_bytes += packet_size; - pkt->pts = xa->audio_frame_counter; - /* 14 bytes Samples per channel with 2 samples per byte */ - xa->audio_frame_counter += 28 * st->codec->channels; + pkt->duration = 28; return ret; } |