dvdplayer: only disable SD mpeg2 for DXVA, seem vaapi and vdpau are ok
authorJoakim Plate <elupus@ecce.se>
Sun, 20 Oct 2013 11:38:26 +0000 (13:38 +0200)
committerJoakim Plate <elupus@ecce.se>
Sun, 20 Oct 2013 11:38:26 +0000 (13:38 +0200)
Partial revert of: f02ac98fe8851aac15245792b9798813fbd06c1a

xbmc/cores/dvdplayer/DVDCodecs/Video/DVDVideoCodecFFmpeg.cpp
xbmc/cores/dvdplayer/DVDCodecs/Video/DXVA.cpp

index 59dc781..143675a 100644 (file)
@@ -71,14 +71,6 @@ enum PixelFormat CDVDVideoCodecFFmpeg::GetFormat( struct AVCodecContext * avctx
   if(!ctx->IsHardwareAllowed())
     return ctx->m_dllAvCodec.avcodec_default_get_format(avctx, fmt);
 
-  /* there are many corrupt mpeg2 rips from dvd's which don't *
-   * follow profile spec properly, they go corrupt on hw, so  *
-   * keep those running in software for the time being.       */
-  if (avctx->codec_id  == AV_CODEC_ID_MPEG2VIDEO
-  &&  avctx->height    <= 576
-  &&  avctx->width     <= 720)
-    return ctx->m_dllAvCodec.avcodec_default_get_format(avctx, fmt);
-
   const PixelFormat * cur = fmt;
   while(*cur != PIX_FMT_NONE)
   {
index 2454434..5296dec 100644 (file)
@@ -447,6 +447,13 @@ static bool CheckCompatibility(AVCodecContext *avctx)
     return false;
   }
 
+  // there are many corrupt mpeg2 rips from dvd's which don't
+  // follow profile spec properly, they go corrupt on hw, so
+  // keep those running in software for the time being.
+  if (avctx->codec_id  == AV_CODEC_ID_MPEG2VIDEO
+  &&  avctx->height    <= 576
+  &&  avctx->width     <= 720)
+    return false;
 
   // Check for hardware limited to H264 L4.1 (ie Bluray).