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

Reimar Döffinger Reimar.Doeffinger
Mon Jul 12 20:12:16 CEST 2010


On Mon, Jul 12, 2010 at 04:34:26PM +0200, Michael Niedermayer wrote:
> 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.

Well, if we want that to work, the MPEG-TS demuxer would probably have
to throw away all subpackets that do not match the IDs.
Considering that the whole sub_id selection thing is broken anyway (e.g.
if there's really a file with multiple sub ids not only could we decode
only one, we might even randomly switch between them depending on in which
order they are in the PMT), I intend to just remove the check from the
dvbsub decoder, I can't see it doing anything but harm.



More information about the ffmpeg-devel mailing list