[Ffmpeg-devel] [PATCH] Clarify definition of r_frame_rate
Michael Niedermayer
michaelni
Sun Nov 12 02:52:09 CET 2006
Hi
On Sat, Nov 11, 2006 at 04:02:22PM -0700, Fred Rothganger wrote:
> Greetings,
>
> I am trying to fix some issues with the calculation of r_frame_rate in
> av_find_stream_info(). As a first step toward that, it would be helpful
> to clarify what r_frame_rate should be. Attached is a patch that adds a
> rather wordy comment to AVStream.r_frame_rate. It describes the
> semantics I have relied on for quite a while for seeking in mpeg files.
> (BTW, "~24fps" means "24000/1001 fps", but it didn't seem important to
> express that much detail.)
>
> -- Fred
> Index: avformat.h
> ===================================================================
> --- avformat.h (revision 6967)
> +++ avformat.h (working copy)
> @@ -235,9 +235,19 @@
> int id; /* format specific stream id */
> AVCodecContext *codec; /* codec context */
> /**
> - * real base frame rate of the stream.
> - * for example if the timebase is 1/90000 and all frames have either
> - * approximately 3600 or 1800 timer ticks then r_frame_rate will be 50/1
> + * The "real" number of frames per second in the stream, as opposed to
> + * the "coded" rate claimed by its metadata. The real and coded frame
> + * rates can differ under at least the following circumstances:
> + * <ul>
> + * <li>The frame rate is variable, in which case this value gives the
> + * average number of frames per second, and the coded frame rate indicates
> + * the time quantum.
this description is wrong, r_frame_rate is NOT the average framerate if it
where it would be called average_framerate
patch rejected
you can add a average_framerate field if you lik but you cannot change the
meaning of a different variable to match what you would want it to mean
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the ffmpeg-devel
mailing list