diff options
author | Stefano Sabatini | 2012-11-06 01:05:14 +0100 |
---|---|---|
committer | Stefano Sabatini | 2012-11-06 01:10:12 +0100 |
commit | 794cea588cc58d82d420ac4c57754a728654dc43 (patch) | |
tree | 4b2f07168b8fe92767c438c60269f288b557a5d4 /doc | |
parent | c99564492c579b6d36e162ce8494a19b7402d8f2 (diff) |
examples/demuxing: dump input information *after* trying to open audio stream
Implement more logical code flow.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/examples/demuxing.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/examples/demuxing.c b/doc/examples/demuxing.c index 22b7060e23..aa8d16eb83 100644 --- a/doc/examples/demuxing.c +++ b/doc/examples/demuxing.c @@ -243,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; @@ -268,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; |