diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-01-11 09:41:06 -0500 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-03-03 17:03:27 -0500 |
commit | 01be6fa926dc3de593756ffd1e09f9523be5fd00 (patch) | |
tree | 378f01491a24c759382c7513d44ce6f15b697c83 | |
parent | d0ab58507480dde81c7127f1eea29e10f91eb4b6 (diff) | |
download | ffmpeg-01be6fa926dc3de593756ffd1e09f9523be5fd00.tar.gz |
psx-str: fix audio pts
Each packet has 18 sectors with 224/channels samples in each sector.
-rw-r--r-- | libavformat/psxstr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/psxstr.c b/libavformat/psxstr.c index 61e24e204f..6405c246bd 100644 --- a/libavformat/psxstr.c +++ b/libavformat/psxstr.c @@ -224,7 +224,9 @@ static int str_read_packet(AVFormatContext *s, // st->codec->bit_rate = 0; //FIXME; st->codec->block_align = 128; - avpriv_set_pts_info(st, 64, 128, st->codec->sample_rate); + avpriv_set_pts_info(st, 64, 18 * 224 / st->codec->channels, + st->codec->sample_rate); + st->start_time = 0; } pkt = ret_pkt; if (av_new_packet(pkt, 2304)) @@ -233,6 +235,7 @@ static int str_read_packet(AVFormatContext *s, pkt->stream_index = str->channels[channel].audio_stream_index; + pkt->duration = 1; return 0; default: av_log(s, AV_LOG_WARNING, "Unknown sector type %02X\n", sector[0x12]); |