[FFmpeg-devel] [PATCH 1/3] lavu/opt: accept NULL and "none" as frame rates
Michael Niedermayer
michael at niedermayer.cc
Tue Apr 19 17:51:36 CEST 2016
On Tue, Apr 19, 2016 at 01:28:01AM -0500, Rodger Combs wrote:
> ---
> libavutil/opt.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/libavutil/opt.c b/libavutil/opt.c
> index eae4f75..83093e0 100644
> --- a/libavutil/opt.c
> +++ b/libavutil/opt.c
> @@ -275,11 +275,12 @@ static int set_string_image_size(void *obj, const AVOption *o, const char *val,
> static int set_string_video_rate(void *obj, const AVOption *o, const char *val, AVRational *dst)
> {
> int ret;
> - if (!val) {
> - ret = AVERROR(EINVAL);
> - } else {
> - ret = av_parse_video_rate(dst, val);
> + if (!val || !strcmp(val, "none")) {
> + dst->num =
> + dst->den = 0;
> + return 0;
"0/0" results in a error but "none" results in 0/0 and success
this seems a odd combination, is that intended ?
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Never trust a computer, one day, it may think you are the virus. -- Compn
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160419/c31626eb/attachment.sig>
More information about the ffmpeg-devel
mailing list