[FFmpeg-devel] [PATCH] doxy: Clarify what avpriv_set_pts_info does
Stefano Sabatini
stefasab at gmail.com
Sun Dec 16 22:03:39 CET 2012
On date Sunday 2012-12-16 15:41:43 -0500, Derek Buitenhuis encoded:
> The "pts for a given stream" was nonsensical.
>
> Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
> ---
> libavformat/internal.h | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/libavformat/internal.h b/libavformat/internal.h
> index 14f4cdb..840b9d2 100644
> --- a/libavformat/internal.h
> +++ b/libavformat/internal.h
> @@ -292,14 +292,15 @@ int64_t ff_gen_search(AVFormatContext *s, int stream_index,
> int64_t (*read_timestamp)(struct AVFormatContext *, int , int64_t *, int64_t ));
>
> /**
> - * Set the pts for a given stream. If the new values would be invalid
> - * (<= 0), it leaves the AVStream unchanged.
> + * Set the time base for a given stream. If the new time base is invalid
This is a bit incomplete, since as the name suggests the function
"sets information to interpret timestamp information correctly", for
example it also sets the number of bits.
So I believe something like:
Set the information to interpret timestamps in the stream. In
particular, set the time base for the given stream.
which sounds a bit awkward and maybe can be improved.
> + * (numerator or denominator are, or are less than zero), it leaves the stream
"are, or are" sounds weird/wrong
"are non-positive" could be a more compact alternative to "are equal
or less than zero".
> + * unchanged.
> *
> * @param s stream
> * @param pts_wrap_bits number of bits effectively used by the pts
> * (used for wrap control, 33 is the value for MPEG)
> - * @param pts_num numerator to convert to seconds (MPEG: 1)
> - * @param pts_den denominator to convert to seconds (MPEG: 90000)
> + * @param pts_num time base numerator (MPEG: 1)
> + * @param pts_den time base denominator (MPEG: 90000)
while at it:
@param pts_num time base numerator (e.g. it is 1 for MPEG)
[...]
--
FFmpeg = Faithless Faithful Magic Portable Elastic Goblin
More information about the ffmpeg-devel
mailing list