]> git.sesse.net Git - ffmpeg/blobdiff - doc/examples/demuxing.c
examples/demuxing: fix braino
[ffmpeg] / doc / examples / demuxing.c
index 0e0015e74225c36119778635f2b9b4e623c85759..2aa00ce0c9b2b66e5a861e6b89c094b0455b3edf 100644 (file)
@@ -26,6 +26,7 @@
  *
  * Show how to use the libavformat and libavcodec API to demux and
  * decode audio and video data.
+ * @example doc/examples/demuxing.c
  */
 
 #include <libavutil/imgutils.h>
@@ -242,9 +243,6 @@ int main (int argc, char **argv)
         video_dst_bufsize = ret;
     }
 
-    /* dump input information to stderr */
-    av_dump_format(fmt_ctx, 0, src_filename, 0);
-
     if (open_codec_context(&audio_stream_idx, fmt_ctx, AVMEDIA_TYPE_AUDIO) >= 0) {
         int nb_planes;
 
@@ -267,6 +265,9 @@ int main (int argc, char **argv)
         }
     }
 
+    /* dump input information to stderr */
+    av_dump_format(fmt_ctx, 0, src_filename, 0);
+
     if (!audio_stream && !video_stream) {
         fprintf(stderr, "Could not find audio or video stream in the input, aborting\n");
         ret = 1;
@@ -288,7 +289,7 @@ int main (int argc, char **argv)
     if (video_stream)
         printf("Demuxing video from file '%s' into '%s'\n", src_filename, video_dst_filename);
     if (audio_stream)
-        printf("Demuxing video from file '%s' into '%s'\n", src_filename, audio_dst_filename);
+        printf("Demuxing audio from file '%s' into '%s'\n", src_filename, audio_dst_filename);
 
     /* read frames from the file */
     while (av_read_frame(fmt_ctx, &pkt) >= 0)