# HG changeset patch # User kostya # Date 1165124875 0 # Node ID 4cb185273d4b91346868df291e2421ec579e2486 # Parent 3b4019c023a3faef190cdd99c6a1063eb242ba2f Do not touch pkt->pts diff -r 3b4019c023a3 -r 4cb185273d4b westwood.c --- a/westwood.c Sun Dec 03 05:29:00 2006 +0000 +++ b/westwood.c Sun Dec 03 05:47:55 2006 +0000 @@ -224,7 +224,7 @@ st = av_new_stream(s, 0); if (!st) return AVERROR_NOMEM; - av_set_pts_info(st, 33, 1, 90000); + av_set_pts_info(st, 33, 1, VQA_FRAMERATE); wsvqa->video_stream_index = st->index; st->codec->codec_type = CODEC_TYPE_VIDEO; st->codec->codec_id = CODEC_ID_WS_VQA; @@ -245,15 +245,12 @@ st->codec->width = LE_16(&header[6]); st->codec->height = LE_16(&header[8]); - st->codec->time_base.num = 1; - st->codec->time_base.den = VQA_FRAMERATE; - /* initialize the audio decoder stream for VQA v1 or nonzero samplerate */ if (LE_16(&header[24]) || (LE_16(&header[0]) == 1 && LE_16(&header[2]) == 1)) { st = av_new_stream(s, 0); if (!st) return AVERROR_NOMEM; - av_set_pts_info(st, 33, 1, 90000); + av_set_pts_info(st, 33, 1, VQA_FRAMERATE); st->codec->codec_type = CODEC_TYPE_AUDIO; if (LE_16(&header[0]) == 1) st->codec->codec_id = CODEC_ID_WESTWOOD_SND1; @@ -342,25 +339,14 @@ if (chunk_type == SND2_TAG) { pkt->stream_index = wsvqa->audio_stream_index; - - pkt->pts = 90000; - pkt->pts *= wsvqa->audio_frame_counter; - pkt->pts /= wsvqa->audio_samplerate; - /* 2 samples/byte, 1 or 2 samples per frame depending on stereo */ wsvqa->audio_frame_counter += (chunk_size * 2) / wsvqa->audio_channels; } else if(chunk_type == SND1_TAG) { pkt->stream_index = wsvqa->audio_stream_index; - - pkt->pts = 90000; - pkt->pts *= wsvqa->audio_frame_counter; - pkt->pts /= wsvqa->audio_samplerate; - /* unpacked size is stored in header */ wsvqa->audio_frame_counter += LE_16(pkt->data) / wsvqa->audio_channels; } else { pkt->stream_index = wsvqa->video_stream_index; - pkt->pts = wsvqa->video_pts; wsvqa->video_pts += VQA_VIDEO_PTS_INC; } /* stay on 16-bit alignment */