diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2012-03-30 02:28:00 +0400 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2012-03-30 04:07:19 +0400 |
commit | 93f6d0475fcf6ad6e94a486eb8f40827e4b9bfa4 (patch) | |
tree | 84624ddc5d654ec242ea6d75b79324138abbac24 /libavformat/output-example.c | |
parent | 28db30aa29e04c4f0cd43936ccea0752cfc57739 (diff) |
avf: make the example output the proper message
av_dump_format needs the codecs opened in order to print
them.
Diffstat (limited to 'libavformat/output-example.c')
-rw-r--r-- | libavformat/output-example.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/output-example.c b/libavformat/output-example.c index a467109fdb..aadd74a2ad 100644 --- a/libavformat/output-example.c +++ b/libavformat/output-example.c @@ -464,8 +464,6 @@ int main(int argc, char **argv) audio_st = add_audio_stream(oc, fmt->audio_codec); } - av_dump_format(oc, 0, filename, 1); - /* now that all the parameters are set, we can open the audio and video codecs and allocate the necessary encode buffers */ if (video_st) @@ -473,6 +471,8 @@ int main(int argc, char **argv) if (audio_st) open_audio(oc, audio_st); + av_dump_format(oc, 0, filename, 1); + /* open the output file, if needed */ if (!(fmt->flags & AVFMT_NOFILE)) { if (avio_open(&oc->pb, filename, AVIO_FLAG_WRITE) < 0) { |