[FFmpeg-devel] [PATCH] Make av_set_pts_info keep previous time base if new one is invalid.

Reimar Döffinger Reimar.Doeffinger
Sun Feb 6 22:20:30 CET 2011


On Sun, Feb 06, 2011 at 04:14:07PM -0500, Ronald S. Bultje wrote:
> >> A return value is useful, so that callers can detect failures to set a
> >> timebase, and error out in read_header() instead of parsing garbage.
> >> If you know of any use case where this doesn't apply (i.e. the output
> >> is not garbage), I'd love to hear it.
> >
> > A single-bit error in the time base? Highly unlikely normally but
> > I don't see what you would win by refusing a file because of a hint
> > there might be only garbage instead of continuing until you actually know.
> > And I am not saying that a return value is certainly useless, but I
> > dislike uglifying the API for "might-be".
> > If it wasn't a public API function I'd have added a return value right
> > away.
> 
> I'll leave it as-is for now, if others agree
> a-return-value-so-demuxers-can-error-out would be nice, I can pick it
> up from here and introduce av_set_pts_info2() or so.

You could start with an internal symbol, we can still pollute
the public API when it's proven some value...
I guess we could also just have it change with a major bump,
ABI compatibility does not matter then and API is compatible
for most uses.
Just the ifdefs to do that are rather ugly.



More information about the ffmpeg-devel mailing list