diff libmpcodecs/dec_video.c @ 35304:d29d116c0818

libmpcodecs: Only choose dummy codecs if forced Allows dummy codecs to have status working while still not being selected in cases where the user does not use -vc/-ac to force particular codecs. Additionally switch dummy codecs null and black to working now.
author al
date Sat, 10 Nov 2012 13:29:36 +0000
parents cdee75826a31
children 0d7459fc4354
line wrap: on
line diff
--- a/libmpcodecs/dec_video.c	Sat Nov 10 13:29:26 2012 +0000
+++ b/libmpcodecs/dec_video.c	Sat Nov 10 13:29:36 2012 +0000
@@ -283,6 +283,11 @@
                    sh_video->codec->name, sh_video->codec->drv);
             continue;
         }
+        /* only allow dummy codecs if specified via -vc */
+        if (sh_video->codec->flags & CODECS_FLAG_DUMMY && !codecname) {
+            continue;
+        }
+
         orig_w = sh_video->bih ? sh_video->bih->biWidth  : sh_video->disp_w;
         orig_h = sh_video->bih ? sh_video->bih->biHeight : sh_video->disp_h;
         sh_video->disp_w = orig_w;