From 36eb90293ef17166b429ba3d64acba1b0f5bde5b Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 8 Jun 2013 00:17:55 -0700 Subject: [PATCH] Don't use m_pFrame->pkt_duration directly. Docs say you're supposed to call this func instead. --- Core/HW/MediaEngine.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Core/HW/MediaEngine.cpp b/Core/HW/MediaEngine.cpp index 2d927d6a53..80bea0d39a 100644 --- a/Core/HW/MediaEngine.cpp +++ b/Core/HW/MediaEngine.cpp @@ -367,8 +367,6 @@ bool MediaEngine::stepVideo(int videoPixelMode) { AVFormatContext *pFormatCtx = (AVFormatContext*)m_pFormatCtx; AVCodecContext *pCodecCtx = (AVCodecContext*)m_pCodecCtx; - AVFrame *pFrame = (AVFrame*)m_pFrame; - AVFrame *pFrameRGB = (AVFrame*)m_pFrameRGB; if ((!m_pFrame)||(!m_pFrameRGB)) return false; AVPacket packet; @@ -390,7 +388,7 @@ bool MediaEngine::stepVideo(int videoPixelMode) { pCodecCtx->height, m_pFrameRGB->data, m_pFrameRGB->linesize); int firstTimeStamp = bswap32(*(int*)(m_pdata + 86)); - m_videopts = pFrame->pkt_dts + pFrame->pkt_duration - firstTimeStamp; + m_videopts = m_pFrame->pkt_dts + av_frame_get_pkt_duration(m_pFrame) - firstTimeStamp; bGetFrame = true; } if (result <= 0 && dataEnd) {