examples/demuxing: dump input information *after* trying to open audio stream
Implement more logical code flow.
This commit is contained in:
parent
c99564492c
commit
794cea588c
@ -243,9 +243,6 @@ int main (int argc, char **argv)
|
|||||||
video_dst_bufsize = ret;
|
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) {
|
if (open_codec_context(&audio_stream_idx, fmt_ctx, AVMEDIA_TYPE_AUDIO) >= 0) {
|
||||||
int nb_planes;
|
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) {
|
if (!audio_stream && !video_stream) {
|
||||||
fprintf(stderr, "Could not find audio or video stream in the input, aborting\n");
|
fprintf(stderr, "Could not find audio or video stream in the input, aborting\n");
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user