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

Michael Niedermayer michaelni
Sun Feb 6 22:51:53 CET 2011


On Sun, Feb 06, 2011 at 10:20:30PM +0100, Reimar D?ffinger wrote:
> 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.

btw is changing a void to int really a ABI breakage on any supported platform?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Incandescent light bulbs waste a lot of energy as heat so the EU forbids them.
Their replacement, compact fluorescent lamps, much more expensive, dont fit in
many old lamps, flicker, contain toxic mercury, produce a fraction of the light
that is claimed and in a unnatural spectrum rendering colors different than
in natural light. Ah and we now need to turn the heaters up more in winter to
compensate the lower wasted heat. Who wins? Not the environment, thats for sure
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20110206/0ce77fa7/attachment.pgp>



More information about the ffmpeg-devel mailing list