[FFmpeg-devel] [PATCH 1/2] lavu/opt: add AV_OPT_VIDEO_RATE option

Clément Bœsch ubitux at gmail.com
Tue Mar 19 19:39:38 CET 2013


On Tue, Mar 19, 2013 at 10:20:01AM +0000, Paul B Mahol wrote:
> Signed-off-by: Paul B Mahol <onemda at gmail.com>
> ---
>  doc/APIchanges      |  3 +++
>  libavutil/opt.c     | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  libavutil/opt.h     |  3 +++
>  libavutil/version.h |  4 ++--
>  4 files changed, 66 insertions(+), 3 deletions(-)
> 
[...]
> +int av_opt_set_video_rate(void *obj, const char *name, AVRational val, int search_flags)
> +{
> +    void *target_obj;
> +    const AVOption *o = av_opt_find2(obj, name, NULL, 0, search_flags, &target_obj);
> +
> +    if (!o || !target_obj)
> +        return AVERROR_OPTION_NOT_FOUND;
> +    if (o->type != AV_OPT_TYPE_VIDEO_RATE) {
> +        av_log(obj, AV_LOG_ERROR,
> +               "The value set by option '%s' is not an video rate.\n", o->name);

s/an/a/, I think

[...]
> @@ -1381,6 +1435,9 @@ int main(void)
>              "sample_fmt=s16",
>              "sample_fmt=2",
>              "sample_fmt=bogus",
> +            "video_rate=pal",
> +            "video_rate=25",
> +            "video_rate=bogus",

Does it work with input like "30000/1001" and/or "30/1.001"?

(No FATE update btw?)

[...]

Rest LGTM

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130319/840c04c8/attachment.asc>


More information about the ffmpeg-devel mailing list