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

Michael Niedermayer michaelni
Mon Jul 12 22:30:06 CEST 2010


On Mon, Jul 12, 2010 at 08:12:16PM +0200, Reimar D?ffinger wrote:
> 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.

yes

lets hope such files dont exist in the wild, or we will have to find a
way to support them. Which would mean either demux subtitle streams further
in the mpegts demuxer or a subtitle stream demuxer chained after mpegts
or duplicate streams in the mpegts demuxer + extradata + that check in the
decoder
none of these is pretty & easy

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you think the mosad wants you dead since a long time then you are either
wrong or dead since a long time.
-------------- 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/69efb0c6/attachment.pgp>



More information about the ffmpeg-devel mailing list