diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-05-20 15:20:47 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-05-21 10:32:25 +0200 |
commit | 6374ee72df91b075870610808b73a51fdb1dad20 (patch) | |
tree | 519aad4f6926677fcf1707980ffb7916436ddc71 | |
parent | 3853e1d94e249bc9826157f74ffe7f33460ac198 (diff) | |
download | ffmpeg-6374ee72df91b075870610808b73a51fdb1dad20.tar.gz |
ffprobe: remove ad-hoc behavior when nb_fmt_entries_to_show is 1
The special-case behavior may complicate parsing when the
-show_format_entry option is used programmatically in a script.
The option default=nk=1 achieves the same purpose, if the objective is to
skip printing the single field key.
-rw-r--r-- | ffprobe.c | 5 | ||||
-rwxr-xr-x | tests/fate-run.sh | 2 |
2 files changed, 1 insertions, 6 deletions
@@ -51,7 +51,6 @@ static int do_show_error = 0; static int do_show_format = 0; static int do_show_frames = 0; static AVDictionary *fmt_entries_to_show = NULL; -static int nb_fmt_entries_to_show; static int do_show_packets = 0; static int do_show_streams = 0; static int do_show_program_version = 0; @@ -399,9 +398,6 @@ static av_cold int default_init(WriterContext *wctx, const char *args, void *opa def->class = &default_class; av_opt_set_defaults(def); - if (nb_fmt_entries_to_show == 1) - def->nokey = 1; - if (args && (err = (av_set_options_string(def, args, "=", ":"))) < 0) { av_log(wctx, AV_LOG_ERROR, "Error parsing options string: '%s'\n", args); @@ -1679,7 +1675,6 @@ static int opt_format(const char *opt, const char *arg) static int opt_show_format_entry(const char *opt, const char *arg) { do_show_format = 1; - nb_fmt_entries_to_show++; av_dict_set(&fmt_entries_to_show, arg, "", 0); return 0; } diff --git a/tests/fate-run.sh b/tests/fate-run.sh index 126f2ce46d..cd94d4ab64 100755 --- a/tests/fate-run.sh +++ b/tests/fate-run.sh @@ -70,7 +70,7 @@ run(){ } probefmt(){ - run ffprobe -show_format_entry format_name -print_format default=nw=1 -v 0 "$@" + run ffprobe -show_format_entry format_name -print_format default=nw=1:nk=1 -v 0 "$@" } avconv(){ |