|
From: rainbyte <rai...@us...> - 2012-07-10 03:09:14
|
Author: Alvaro Fernando Garcia <alv...@gm...>
Date: Tue Jul 10 00:06:37 2012 -0300
Fix video playback issue in dance mode.
---
game/ffmpeg.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/game/ffmpeg.cc b/game/ffmpeg.cc
index e4440ed..616384e 100644
--- a/game/ffmpeg.cc
+++ b/game/ffmpeg.cc
@@ -161,8 +161,8 @@ void FFmpeg::decodePacket() {
packetSize -= decodeSize; // Move forward within the packet
if (!frameFinished) continue;
// Update current position if timecode is available
- if (frame->pkt_pts != uint64_t(AV_NOPTS_VALUE)) {
- m_position = double(frame->pkt_pts) * av_q2d(m_formatContext->streams[m_streamId]->time_base);
+ if (packet.pts != int64_t(AV_NOPTS_VALUE)) {
+ m_position = double(packet.pts) * av_q2d(m_formatContext->streams[m_streamId]->time_base);
}
if (m_mediaType == AVMEDIA_TYPE_VIDEO) processVideo(frame); else processAudio(frame);
}
|