[FFmpeg-devel] [PATCH] avformat: Remove use of AVFrac and AVStream->pts

Nicolas George george at nsup.org
Mon Aug 17 16:36:52 CEST 2015


Le decadi 30 thermidor, an CCXXIII, Michael Niedermayer a écrit :
> From: Michael Niedermayer <michael at niedermayer.cc>
> 
> Move field to internal part of AVStream and struct to internal.h
> 
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
>  libavformat/avformat.h |    2 ++
>  libavformat/internal.h |   12 ++++++++++++
>  libavformat/mux.c      |   22 ++++++++++++++--------
>  libavformat/utils.c    |    6 +++++-
>  4 files changed, 33 insertions(+), 9 deletions(-)

I see there are very few uses of this structure: why not simply replace it
by stand-alone fields?

	int64_t pts_int, pts_num, pts_den;

The only use of frac_init() can be inlined:

	st->pts_int = 0;
	st->pts_num = 0;
	st->pts_den = den;

And frac_add() is used only twice, both times directly on &st->pts, it could
become:

	void pts_add(AVStream *st, int64_t incr)

Or maybe I am missing something obvious?

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150817/127efee5/attachment.sig>


More information about the ffmpeg-devel mailing list