[FFmpeg-devel] [PATCH] lavf: JSON captions demuxer.
Jean First
jeanfirst at gmail.com
Sun Dec 9 15:58:43 CET 2012
On Tue Nov 27 2012 19:58:30 GMT+0100 (CET), Nicolas George wrote:
> TODO version bump.
>
> Signed-off-by: Nicolas George <nicolas.george at normalesup.org>
> ---
> Changelog | 1 +
> doc/demuxers.texi | 21 +++
> doc/general.texi | 1 +
> libavformat/Makefile | 1 +
> libavformat/allformats.c | 1 +
> libavformat/tedcaptionsdec.c | 355 ++++++++++++++++++++++++++++++++++++++++++
> tools/bookmarklets.html | 55 +++++++
> 7 files changed, 435 insertions(+)
> create mode 100644 libavformat/tedcaptionsdec.c
> create mode 100644 tools/bookmarklets.html
[...]
> +static av_cold int tedcaptions_read_header(AVFormatContext *avf)
> +{
> + TEDCaptionsDemuxer *tc = avf->priv_data;
> + AVStream *st;
> + int ret, i;
> + AVPacket *last;
> +
> + ret = parse_file(avf->pb, &tc->subs);
> + if (ret < 0) {
> + if (ret == AVERROR_INVALIDDATA)
> + av_log(avf, AV_LOG_ERROR, "Syntax error near offset %"PRId64".\n",
> + avio_tell(avf->pb));
>
nit: in case the subtitles are tidy, it would be nice to have the line
number of the occurring error too.
Jean
More information about the ffmpeg-devel
mailing list