OSDN Git Service

examples/muxing: check on frame
authorStefano Sabatini <stefasab@gmail.com>
Wed, 17 Oct 2012 09:08:53 +0000 (11:08 +0200)
committerStefano Sabatini <stefasab@gmail.com>
Wed, 17 Oct 2012 19:39:13 +0000 (21:39 +0200)
Fix crash in case frame is not defined (e.g. with muxing out.wav).

doc/examples/muxing.c

index 22bbeca..b143a93 100644 (file)
@@ -467,7 +467,8 @@ int main(int argc, char **argv)
         return 1;
     }
 
-    frame->pts = 0;
+    if (frame)
+        frame->pts = 0;
     for (;;) {
         /* Compute current audio and video time. */
         if (audio_st)