|
From: rainbyte <rai...@us...> - 2012-07-17 10:52:15
|
Author: Alvaro Fernando García <alv...@gm...>
Date: Sun Jul 8 04:52:42 2012 -0300
Fixed ffmpeg.cc compilation error.
---
game/ffmpeg.cc | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/game/ffmpeg.cc b/game/ffmpeg.cc
index fae6e3d..1393760 100644
--- a/game/ffmpeg.cc
+++ b/game/ffmpeg.cc
@@ -154,7 +154,9 @@ void FFmpeg::decodePacket() {
if (packet.stream_index != m_streamId) return;
AVFrameWrapper frame;
int frameFinished = 0;
- int decodeSize = (m_mediaType == AVMEDIA_TYPE_VIDEO ? avcodec_decode_video2 : avcodec_decode_audio4)(m_codecContext, frame, &frameFinished, &packet);
+ int decodeSize = (m_mediaType == AVMEDIA_TYPE_VIDEO ?
+ avcodec_decode_video2(m_codecContext, frame, &frameFinished, &packet) :
+ avcodec_decode_audio4(m_codecContext, frame, &frameFinished, &packet));
if (decodeSize < 0) throw std::runtime_error("cannot decode avframe");
packetSize -= decodeSize; // Move forward within the packet
if (!frameFinished) continue;
|