diff utils.c @ 1003:2d57ce58f576 libavformat

simplify AVFormatParameters NULL checks
author michael
date Sat, 11 Mar 2006 00:22:21 +0000
parents d2e5dfdf4def
children bddcb32bde33
line wrap: on
line diff
--- a/utils.c	Wed Mar 08 21:51:39 2006 +0000
+++ b/utils.c	Sat Mar 11 00:22:21 2006 +0000
@@ -465,6 +465,12 @@
 {
     int err;
     AVFormatContext *ic;
+    AVFormatParameters default_ap;
+
+    if(!ap){
+        ap=&default_ap;
+        memset(ap, 0, sizeof(default_ap));
+    }
 
     ic = av_alloc_format_context();
     if (!ic) {