Permalink
Browse files

Allow interlaced video to play using VDA when using Mountain Lion

Apple has fixed (some) issues with VDA in Mountain Lion. Interlaced videos that used to cause a kernel panic now either play properly, or the decoder returns an error and so the code default to software decoder
  • Loading branch information...
jyavenard committed Jul 5, 2012
1 parent 38c4fe5 commit 248947a0dba6c3d71b9bbfcf41c2091ab8edd0e4
Showing with 14 additions and 1 deletion.
  1. +14 −1 mythtv/libs/libmythtv/privatedecoder_vda.cpp
@@ -15,6 +15,8 @@
#endif
#include "H264Parser.h"
+#include <CoreServices/CoreServices.h>
+
extern "C" {
#include "libavformat/avformat.h"
}
@@ -401,7 +403,18 @@ bool PrivateDecoderVDA::Init(const QString &decoder,
{
m_max_ref_frames = avctx->refs;
}
- if (interlaced)
+
+ bool isMountainLion = false;
+ SInt32 majorVersion, minorVersion;
+
+ Gestalt(gestaltSystemVersionMajor, &majorVersion);
+ Gestalt(gestaltSystemVersionMinor, &minorVersion);
+ if (majorVersion >= 10 && minorVersion >= 8)
+ {
+ isMountainLion = true;
+ }
+
+ if (!isMountainLion && interlaced)
{
LOG(VB_GENERAL, LOG_ERR, LOC + "Possible interlaced content. Aborting");
CFRelease(avc_cdata);

0 comments on commit 248947a

Please sign in to comment.