[FFmpeg-devel] [PATCH] ffprobe: add -show_data_hash option.
george at nsup.org
Sun May 4 16:45:08 CEST 2014
Le quintidi 15 floréal, an CCXXII, Nicolas George a écrit :
> This time with a list of ciphers in the error message.
> + av_log(NULL, AV_LOG_ERROR,
> + "Unknown hash algorithm '%s'\nKnown algorithms:",
> + show_data_hash);
> + for (i = 0; (n = av_hash_names(i)); i++)
> + av_log(NULL, AV_LOG_ERROR, " %s", n);
> + av_log(NULL, AV_LOG_ERROR, "\n");
For this kind of situation, I believe we should make a habit of having
always two version of the function:
int av_foo_get(FooContext *rfoo, const char *name);
int av_foo_parse(FooContext *rfoo, const char *name, void *log);
The first one just returns an error code, the second one logs a clear error
message (possibly with the detailed explanation of the error, or in this
case the list of accepted strings).
If we can stick to a stable naming convention (maybe _parse is already used
in too much places to serve), that would be a great help.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: Digital signature
More information about the ffmpeg-devel