[FFmpeg-devel] [PATCH] ffmpeg: remove unused sync_ist attribute from OutputStream

Wolfram Gloger wg at malloc.de
Fri Mar 23 17:20:42 CET 2012

> On Wed, Mar 21, 2012 at 02:23:44PM +0100, Matthieu Bouron wrote:
>> Hi,
>> This patch remove the sync_ist attribute from OutputStream.
>> sync_ist is not used anymore in ffmpeg.c. Usage was removed by commit:
>> d97fa416d62fe00a69e5be947d7c51b71982dd12.

Michael Niedermayer <michaelni at gmx.at> writes:

> theres more dead code resulting from this, up to the parsing of the
> sync streams. I think it would be better to fix the code unless it
> has no use case
> maybe wolfram could comment on the usecase part? he was the author of
> this IIRC

Good memory :)..  The above commit actually removed the 'sync against an
arbitrary input stream' feature.  If you want to keep it this way, you
might as well also remove the specification of the input sync stream

But, I still consider this feature necessary.

Example: input is mpeg with one video and one audio stream, with precise
timestamps for every packet.  Output is avi (no timestamps) and you want
to reencode video but copy audio (therefore no -async option possible).

If you don't use the 'sync the video stream against the audio stream'
(which used to be the default in ffmpeg way back before May 2005),
you can then get the audio stream drifting further and further away,
because the AVI player only has the decoded duration of the audio frames
available, and _not_ the precise timestamps the audio frames had in the
original input.

I would suggest to fix the above commit if possible so as to retain
the feature.  Have not looked at that yet; do you agree?


More information about the ffmpeg-devel mailing list