diff options
author | Stefano Sabatini | 2013-06-27 00:09:49 +0200 |
---|---|---|
committer | Stefano Sabatini | 2013-06-27 00:20:11 +0200 |
commit | 205092bf478f444fb8e6f4d0f45f07fac27be352 (patch) | |
tree | ba12f9f3738a77c62ecec74ca1a88d7cfba7cace /ffprobe.c | |
parent | 80b56a7bdd0f541d9c9f029bd01e57fb6b352e33 (diff) |
ffprobe: simplify branching logic in probe_file()
Diffstat (limited to 'ffprobe.c')
-rw-r--r-- | ffprobe.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1904,7 +1904,10 @@ static int probe_file(WriterContext *wctx, const char *filename) do_read_packets = do_show_packets || do_count_packets; ret = open_input_file(&fmt_ctx, filename); - if (ret >= 0) { + if (ret < 0) + return ret; + + /* todo: reindent */ nb_streams_frames = av_calloc(fmt_ctx->nb_streams, sizeof(*nb_streams_frames)); nb_streams_packets = av_calloc(fmt_ctx->nb_streams, sizeof(*nb_streams_packets)); selected_streams = av_calloc(fmt_ctx->nb_streams, sizeof(*selected_streams)); @@ -1949,7 +1952,7 @@ static int probe_file(WriterContext *wctx, const char *filename) av_freep(&nb_streams_frames); av_freep(&nb_streams_packets); av_freep(&selected_streams); - } + return ret; } |