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

Reimar Döffinger Reimar.Doeffinger
Mon Jul 12 08:25:39 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.

Is it really supposed to be the same stream when the anc value changes?
That's not how I understood at least Michael's comments.

> >Or should then all have a special case for DVBSUB as well?
> >I can't image misusing codec_tag as ending up as anything other
> >than quite painful.
> 
> Like sub_id it is simpler, malloc is way more painful.

It's a maybe two-line code difference, in the context of the MPEG-TS
demuxer I have a hard time considering that relevant.
Also extradata is something that is known to be necessary to pass around
between codecs, I doubt any other application cares about sub_id,
and probably quite a few won't expect codec_tag to make the difference
between working and non-working.
But none of this is the real issue, the dvbsub decoder not doing anything
at all by default (unless you get the right sub_id from somewhere) is
rather brain-dead. Extradata means we have an obvious "someone got it wrong"
value. If you can suggest such one for sub_id I really don't care.



More information about the ffmpeg-devel mailing list