Skip to content
Snippets Groups Projects
Commit 205092bf authored by Stefano Sabatini's avatar Stefano Sabatini
Browse files

ffprobe: simplify branching logic in probe_file()

parent 80b56a7b
No related branches found
No related tags found
No related merge requests found
...@@ -1904,7 +1904,10 @@ static int probe_file(WriterContext *wctx, const char *filename) ...@@ -1904,7 +1904,10 @@ static int probe_file(WriterContext *wctx, const char *filename)
do_read_packets = do_show_packets || do_count_packets; do_read_packets = do_show_packets || do_count_packets;
ret = open_input_file(&fmt_ctx, filename); 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_frames = av_calloc(fmt_ctx->nb_streams, sizeof(*nb_streams_frames));
nb_streams_packets = av_calloc(fmt_ctx->nb_streams, sizeof(*nb_streams_packets)); nb_streams_packets = av_calloc(fmt_ctx->nb_streams, sizeof(*nb_streams_packets));
selected_streams = av_calloc(fmt_ctx->nb_streams, sizeof(*selected_streams)); selected_streams = av_calloc(fmt_ctx->nb_streams, sizeof(*selected_streams));
...@@ -1949,7 +1952,7 @@ static int probe_file(WriterContext *wctx, const char *filename) ...@@ -1949,7 +1952,7 @@ static int probe_file(WriterContext *wctx, const char *filename)
av_freep(&nb_streams_frames); av_freep(&nb_streams_frames);
av_freep(&nb_streams_packets); av_freep(&nb_streams_packets);
av_freep(&selected_streams); av_freep(&selected_streams);
}
return ret; return ret;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment