Revision: 34795
http://sourceforge.net/p/opalvoip/code/34795
Author: rjongbloed
Date: 2016-04-26 10:50:14 +0000 (Tue, 26 Apr 2016)
Log Message:
-----------
Fixed crash if something else in the system happens to use FFMPEG independent of PTLib/OPAL
Modified Paths:
--------------
opal/trunk/plugins/video/common/ffmpeg.cxx
Modified: opal/trunk/plugins/video/common/ffmpeg.cxx
===================================================================
--- opal/trunk/plugins/video/common/ffmpeg.cxx 2016-04-25 13:19:10 UTC (rev 34794)
+++ opal/trunk/plugins/video/common/ffmpeg.cxx 2016-04-26 10:50:14 UTC (rev 34795)
@@ -91,7 +91,7 @@
(len == 2 && isxdigit(buffer[1])))
level = 6;
- if (avcl != NULL && strcmp((*(AVClass**)avcl)->class_name, "AVCodecContext") == 0)
+ if (avcl != NULL && strcmp((*(AVClass**)avcl)->class_name, "AVCodecContext") == 0 && static_cast<AVCodecContext *>(avcl)->opaque != NULL)
static_cast<FFMPEGCodec *>(static_cast<AVCodecContext *>(avcl)->opaque)->ErrorCallback(level, buffer);
else
PTRACE(level, "FFMPEG", buffer);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|