Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 248947a0dba6c3d71b9bbfcf41c2091ab8edd0e4 1 parent 38c4fe5
@jyavenard jyavenard authored
Showing with 14 additions and 1 deletion.
  1. +14 −1 mythtv/libs/libmythtv/privatedecoder_vda.cpp
View
15 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);
Please sign in to comment.
Something went wrong with that request. Please try again.