[FFmpeg-devel] Fix ffmpeg -re behaviour

Stefano Sabatini stefano.sabatini-lala
Sun Nov 23 11:41:39 CET 2008


On date Saturday 2008-11-22 22:36:29 +0100, Michael Niedermayer encoded:
> On Sat, Nov 22, 2008 at 07:17:00PM +0100, Stefano Sabatini wrote:
[...]
> > Check the patch, I also changed the name pts -> next, I think it's
> > less prone to confusion since "pts" may be confused with the meaning
> > of pts in ist->next_pts (which uses another time unit).
> 
> so the patch contains 3 unrelated changes now ...

Sorry for that.

Patches:

* fixrate-emu-pts.patch
  Use ist->next_pts rather than use frame_nb * codec_time_base as the
  timestamp for the next frame to print.
  This assumption is not always true and only works for video codecs anyway.

* rename-pts.patch
  Rename the pts variable, which may be confused with the meaning
  of pts in ist->next_pts (which uses another time unit).

* remove-ist-frame
  Remove the variable ist->frame, not anymore used.

As for the other change, that is to change the context where rate_emu
has to be applied, I want to think a bit more about it and/or hear the
opinion of the maintainer (Michael)/other devs.

The alternatives are:
1. leave as it is, that is as a property of just *the first video
  stream* found in an input file

2. make it a property of the input file, that is to set rate_emu for
  all the streams of an input file

3. make it a global property, that is a property of *all* the input
  streams, as in the previous patch

I have a preference for solution 2.

Regards.
-- 
FFmpeg = Frenzy & Forgiving Magical Picky Experimenting Guru
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixrate-emu-pts.patch
Type: text/x-diff
Size: 637 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081123/c4d4655d/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: rename-pts.patch
Type: text/x-diff
Size: 690 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081123/c4d4655d/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-ist-frame.patch
Type: text/x-diff
Size: 987 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081123/c4d4655d/attachment-0002.patch>



More information about the ffmpeg-devel mailing list