[FFmpeg-devel] [RFC] TS/DVB subtitle sub_id hack

Michael Niedermayer michaelni
Mon Jul 12 16:34:26 CEST 2010

On Sun, Jul 11, 2010 at 11:11:31PM -0700, Baptiste Coudurier wrote:
> On 7/11/10 3:43 PM, Reimar D?ffinger wrote:
>> On Sun, Jul 11, 2010 at 03:33:00PM -0700, Baptiste Coudurier wrote:
>>> Even easier is to use codec_tag.
>>> I don't think extradata is a good idea. It makes applications do if
>>> codec_id == CODEC_ID_DVBSUB then set extradata which is more
>>> complicated than setting sub_id even if it does not conform to the
>>> documentation.
>> How is if (codec_id == CODEC_ID_DVBSUB) {misuse codec_tag}
>> significantly better?
> At least, it avoids malloc.
> Besides the anc value change it will be more complicated to handle,
> since extradata is not supposed to change.

if the anc value changes (i dont know if thats allowed btw) then all
variants discussed will have a race condition.
That is because things passed from demuxer to decoder over AVCodecContext
happens immedeatly but there can be a packet que between demux and decode
(ffplay has such a packet que for example)
thus the decoder would see the anc change while it still might receive
packets that predate the change.
This is also why non constant palette passing over AVCodecContext doesnt


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is finding an approximation of the exact
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100712/c06ee545/attachment.pgp>

More information about the ffmpeg-devel mailing list