[FFmpeg-devel] [PATCH] Helpful message when page_id != described in PMT

Anshul Maheshwari anshul.ffmpeg at gmail.com
Sat Jun 28 09:30:39 CEST 2014


On Sat, Jun 28, 2014 at 8:03 AM, Michael Niedermayer <michaelni at gmx.at>
wrote:

> On Sat, Jun 28, 2014 at 03:36:28AM +0530, Anshul Maheshwari wrote:
> > Please find patch attached, 1 line change not worth explaining.
> > for details on Ticket 2161 please go through ticket i have added comment
> > there.
> >
> >
> > -Anshul
>
> >  dvbsubdec.c |    2 ++
> >  1 file changed, 2 insertions(+)
> > c8c7026b675e32bc3a3e908899febcea55cfa3b8
>  0001-Helpful-message-when-page_id-described-in-PMT.patch
> > From 6befb5b74a2d40afe326579dce1264cbd8f970d9 Mon Sep 17 00:00:00 2001
> > From: Anshul Maheshwari <anshul.ffmpeg at gmail.com>
> > Date: Sat, 28 Jun 2014 03:29:05 +0530
> > Subject: [PATCH] Helpful message when page_id != described in PMT
> >
> > Related to Ticket 2161
> > ---
> >  libavcodec/dvbsubdec.c | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/libavcodec/dvbsubdec.c b/libavcodec/dvbsubdec.c
> > index e958ae1..f227573 100644
> > --- a/libavcodec/dvbsubdec.c
> > +++ b/libavcodec/dvbsubdec.c
> > @@ -1561,6 +1561,8 @@ static int dvbsub_decode(AVCodecContext *avctx,
> >                          segment_type, page_id, segment_length);
> >                  break;
> >              }
> > +        } else {
> > +            av_log(avctx, AV_LOG_WARNING,"Invalid Page segment\n");
>
> why are they invalid ?
> are they not just "not supported" ?
>

They are invalid because they does not match with any composition id and
ancillary id.

since in mpegts.c in function ff_parse_mpeg2_descriptor we have already
specified
avpriv_request_sample(fc, "DVB subtitles with multiple languages");
so if we have multi compostion or ancillary id, then we have already warned
them.
Though I have one such video and i working to support multi language.

According to spec
page_id: The page_id identifies the subtitle service of the data contained
in this subtitling_segment. Segments with a
page_id value signalled in the subtitling descriptor as the composition
page id, carry subtitling data specific for one
subtitle service. Accordingly, segments with the page_id signalled in the
subtitling descriptor as the ancillary page id,
carry data that may be shared by multiple subtitle services.

So if any one honoring ancillary and compostion page id(not equal to -1),
then they should/must
keep page_id equals to either ancillary or composition id.

I think there is no any way to support this dangling page_id.

If you have idea about how and why to support then please share :)


More information about the ffmpeg-devel mailing list