From c43566e4a053a84efa58060c5f5d1d4d6e3886f3 Mon Sep 17 00:00:00 2001 From: martii Date: Tue, 15 Apr 2014 21:59:22 +0200 Subject: [PATCH] libeplayer3/writer/pcm: unbreak --- libeplayer3/writer/pcm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libeplayer3/writer/pcm.cpp b/libeplayer3/writer/pcm.cpp index 829f260..41a5540 100644 --- a/libeplayer3/writer/pcm.cpp +++ b/libeplayer3/writer/pcm.cpp @@ -328,11 +328,11 @@ bool WriterPCM::Write(int fd, AVFormatContext *avfc, AVStream *stream, AVPacket } // FIXME. PTS calculation is probably broken. int64_t next_in_pts = av_rescale(av_frame_get_best_effort_timestamp(decoded_frame), - stream->time_base.num * out_sample_rate * c->sample_rate, + stream->time_base.num * (int64_t)out_sample_rate * c->sample_rate, stream->time_base.den); int64_t next_out_pts = av_rescale(swr_next_pts(swr, next_in_pts), stream->time_base.den, - stream->time_base.num * out_sample_rate * c->sample_rate); + stream->time_base.num * (int64_t)out_sample_rate * c->sample_rate); pts = calcPts(avfc, stream, next_out_pts); out_samples = swr_convert(swr, &output, out_samples, (const uint8_t **) &decoded_frame->data[0], in_samples);