On Sat, May 14, 2011 at 5:46 AM, Reinhard Tartler <siret...@tauware.de> wrote: > > Am Freitag, den 13.05.2011, 15:30 -0700 schrieb Aℓex Converse: > > -- > > libavformat/avformat.h | 5 +++++ > > libavformat/options.c | 1 + > > libavformat/utils.c | 2 ++ > > 3 files changed, 8 insertions(+), 0 deletions(-) > > > > diff --git a/libavformat/avformat.h b/libavformat/avformat.h > > index 7327562..0678aea 100644 > > --- a/libavformat/avformat.h > > +++ b/libavformat/avformat.h > > @@ -811,6 +811,11 @@ typedef struct AVFormatContext { > > * - decoding: Unused. > > */ > > int64_t start_time_realtime; > > + > > + /** > > + * decoding: number of frames used to probe fps > > + */ > > + int fpsprobesize; > > } AVFormatContext; > > > > Patch is missing a minor bump. >
Updated
From 3ad33f9b463b8585b163e06ce8148fef3541c28d Mon Sep 17 00:00:00 2001 From: Alex Converse <aconve...@google.com> Date: Mon, 9 May 2011 14:34:23 -0700 Subject: [PATCH] avformat: Add fpsprobesize as an AVOption. --- doc/APIchanges | 3 +++ libavformat/avformat.h | 5 +++++ libavformat/options.c | 1 + libavformat/utils.c | 2 ++ libavformat/version.h | 4 ++-- 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index ee96ddf..f9217ca 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -13,6 +13,9 @@ libavutil: 2011-04-18 API changes, most recent first: +2011-05-16 - XXXXXXX - lavf 53.1.0 - avformat.h + Add fps_probe_size to AVFormatContext. + 2011-05-10 - 188dea1 - lavc 53.3.0 - avcodec.h Deprecate AVLPCType and the following fields in AVCodecContext: lpc_coeff_precision, prediction_order_method, diff --git a/libavformat/avformat.h b/libavformat/avformat.h index 7327562..976ea97 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -811,6 +811,11 @@ typedef struct AVFormatContext { * - decoding: Unused. */ int64_t start_time_realtime; + + /** + * decoding: number of frames used to probe fps + */ + int fps_probe_size; } AVFormatContext; typedef struct AVPacketList { diff --git a/libavformat/options.c b/libavformat/options.c index bdf4796..93c8169 100644 --- a/libavformat/options.c +++ b/libavformat/options.c @@ -57,6 +57,7 @@ static const AVOption options[]={ {"fdebug", "print specific debug info", OFFSET(debug), FF_OPT_TYPE_FLAGS, {.dbl = DEFAULT }, 0, INT_MAX, E|D, "fdebug"}, {"ts", NULL, 0, FF_OPT_TYPE_CONST, {.dbl = FF_FDEBUG_TS }, INT_MIN, INT_MAX, E|D, "fdebug"}, {"max_delay", "maximum muxing or demuxing delay in microseconds", OFFSET(max_delay), FF_OPT_TYPE_INT, {.dbl = DEFAULT }, 0, INT_MAX, E|D}, +{"fpsprobesize", "number of frames used to probe fps", OFFSET(fps_probe_size), FF_OPT_TYPE_INT, -1, -1, INT_MAX-1, D}, {NULL}, }; diff --git a/libavformat/utils.c b/libavformat/utils.c index 67aa76a..5890128 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2227,6 +2227,8 @@ int av_find_stream_info(AVFormatContext *ic) the correct fps */ if (av_q2d(st->time_base) > 0.0005) fps_analyze_framecount *= 2; + if (ic->fps_probe_size >= 0) + fps_analyze_framecount = ic->fps_probe_size; /* variable fps and no guess at the real fps */ if( tb_unreliable(st->codec) && !(st->r_frame_rate.num && st->avg_frame_rate.num) && st->info->duration_count < fps_analyze_framecount diff --git a/libavformat/version.h b/libavformat/version.h index 22b5dc9..a7e8618 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -24,8 +24,8 @@ #include "libavutil/avutil.h" #define LIBAVFORMAT_VERSION_MAJOR 53 -#define LIBAVFORMAT_VERSION_MINOR 0 -#define LIBAVFORMAT_VERSION_MICRO 3 +#define LIBAVFORMAT_VERSION_MINOR 1 +#define LIBAVFORMAT_VERSION_MICRO 0 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ -- 1.7.3.1
_______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel