changeset 36158:749f1c5c4267

Make parser allocation work if a codec was forced.
author reimar
date Thu, 09 May 2013 07:24:34 +0000
parents 868f3a141dca
children 7425021012b4
files libmpdemux/demuxer.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libmpdemux/demuxer.c	Thu May 09 07:18:48 2013 +0000
+++ b/libmpdemux/demuxer.c	Thu May 09 07:24:34 2013 +0000
@@ -32,6 +32,7 @@
 #include "help_mp.h"
 #include "m_config.h"
 #include "mpcommon.h"
+#include "codec-cfg.h"
 
 #include "libvo/fastmemcpy.h"
 
@@ -561,6 +562,8 @@
         return;
 
     allocate_parser(avctx, parser, sh->format);
+    if (!*parser && sh->codec) // fallback to support forcing a codec
+        allocate_parser(avctx, parser, sh->codec->fourcc[0]);
     sh->avctx  = *avctx;
     sh->parser = *parser;
 }