summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordknn <yoann.blein@free.fr>2012-08-16 16:05:33 (GMT)
committerdknn <yoann.blein@free.fr>2012-09-22 09:32:38 (GMT)
commit867a950d5b3eb1422051a57c2533509188014b1a (patch)
tree01c9d7372c7e780aaa90456df2bac55082632dae /Swiften/ScreenSharing/VP8Decoder.cpp
parent054bf7baf02cf088930c340fead40b464c1ed015 (diff)
downloadswift-contrib-867a950d5b3eb1422051a57c2533509188014b1a.zip
swift-contrib-867a950d5b3eb1422051a57c2533509188014b1a.tar.bz2
Add error resilence (buggy)
Diffstat (limited to 'Swiften/ScreenSharing/VP8Decoder.cpp')
-rw-r--r--Swiften/ScreenSharing/VP8Decoder.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/Swiften/ScreenSharing/VP8Decoder.cpp b/Swiften/ScreenSharing/VP8Decoder.cpp
index 40f631f..2634cc5 100644
--- a/Swiften/ScreenSharing/VP8Decoder.cpp
+++ b/Swiften/ScreenSharing/VP8Decoder.cpp
@@ -40,21 +40,23 @@ void VP8Decoder::updateCodecConfig()
}
}
-void VP8Decoder::decodeFrame(const std::vector<uint8_t>& frame)
+void VP8Decoder::decodeFrame(const std::vector<uint8_t>& frame, int pictureID)
{
// Decode the frame
vpx_codec_err_t err = vpx_codec_decode(&codecContext, &frame[0], frame.size(), NULL, 0);
if (err) {
SWIFT_LOG(debug) << "VP8 Decoder: Failed to decode frame, " << vpx_codec_err_to_string(err) << std::endl;
- // TODO: exception ?
+ onNewFrameDecoded(pictureID, false);
return;
+ } else {
+ onNewFrameDecoded(pictureID, true);
}
vpx_codec_iter_t iter = NULL;
vpx_image_t* img;
while ((img = vpx_codec_get_frame(&codecContext, &iter))) {
Image rgbImg = convertYV12toRGB(img);
- onNewImageDecoded(rgbImg);
+ onNewImageAvailable(rgbImg);
}
}