[FFmpeg-devel] [PATCH] Add MPL2 subtitles demuxer and decoder.
Clément Bœsch
ubitux at gmail.com
Sat Dec 29 19:08:38 CET 2012
On Sat, Dec 29, 2012 at 12:13:08PM +0000, Paul B Mahol wrote:
> On 12/27/12, Clement Boesch <ubitux at gmail.com> wrote:
> > ---
> > Changelog | 1 +
> > doc/general.texi | 1 +
> > libavcodec/Makefile | 1 +
> > libavcodec/allcodecs.c | 1 +
> > libavcodec/avcodec.h | 1 +
> > libavcodec/mpl2dec.c | 94 +++++++++++++++++++++++++++++
> > libavcodec/version.h | 2 +-
> > libavformat/Makefile | 1 +
> > libavformat/allformats.c | 1 +
> > libavformat/mpl2dec.c | 150
> > +++++++++++++++++++++++++++++++++++++++++++++++
> > libavformat/version.h | 4 +-
> > tests/fate/subtitles.mak | 3 +
> > tests/ref/fate/sub-mpl2 | 1 +
> > 13 files changed, 258 insertions(+), 3 deletions(-)
> > create mode 100644 libavcodec/mpl2dec.c
> > create mode 100644 libavformat/mpl2dec.c
> > create mode 100644 tests/ref/fate/sub-mpl2
> >
>
> [...]
>
> > + return 0;
> > +}
> > +
> > +static int mpl2_decode_frame(AVCodecContext *avctx, void *data,
> > + int *got_sub_ptr, AVPacket *avpkt)
> > +{
> > + AVBPrint buf;
> > + AVSubtitle *sub = data;
> > + const char *ptr = avpkt->data;
> > + const int ts_start = av_rescale_q(avpkt->pts,
> > avctx->time_base, (AVRational){1,100});
> > + const int ts_duration = avpkt->duration != -1 ?
>
> AV_NOPTS_VALUE ?
>
No, duration=-1 means "event last up to the next one".
--
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121229/129d9535/attachment.asc>
More information about the ffmpeg-devel
mailing list