[FFmpeg-devel] [PATCH 2/2] Adding closed caption decoder

Nicolas George george at nsup.org
Wed Dec 3 22:03:01 CET 2014


Le tridi 13 frimaire, an CCXXIII, Anshul a écrit :
> Thanks I was searching for this, even I asked for same on Irc.
> 
> Nicolas: The changes from your pair of patch,
> 1) I removed c708 part (whole) since both are same, 708 just have some
> extra feature then 608.
>     In your first patch it was just registering c708, and I have not
> used that patch.

Ok, but is it correct? I mean: if the video that is being decoded contains
c708 with the extra features used, then the output will not be valid 608,
right? Or am I just writing nonsense?

> 2) you used i as the index of subcc, but I have used stream_idx
> your code was lavfi->sink_stream_subcc_map[i] = !!use_subcc; 
> I changed it to
>  lavfi->sink_stream_subcc_map[stream_idx] = !!use_subcc; 

That looks suspicious. Can you explain your change? Did you test it with
filter graphs that contains several sinks?

> There were one more changes but that was  to get your patch in mainstream
> like av_malloc_array instead av_malloc.

Ok, seen it, this one looks good.

> I have considered all your comments, but it would be better to check again.

Will do, of course. But very busy week ahead. Just a few words below:


> >From 09a199afa72eeb7b8be8527da7239f4abcc52dbe Mon Sep 17 00:00:00 2001
> From: Nicolas George <george at nsup.org>
> Date: Tue, 28 Oct 2014 14:41:15 +0530

> Subject: [PATCH 1/2] allow to extract subcc

The commit message was prefixed with "lavd/lavdi:". You should use "git am"
to apply patches including commit message and such.

> --- a/doc/indevs.texi
> +++ b/doc/indevs.texi
> @@ -494,6 +494,9 @@ number starting from 0 corresponding to the mapped input stream
>  generated by the device.
>  The first unlabelled output is automatically assigned to the "out0"
>  label, but all the others need to be specified explicitly.

> +The suffix "+subcc" can be appended to the output label to create an extra
> +stream with the closed captions packets attached to that output
> +(experimental).

I have a local change adding "; only for CEA-708 for now" after
experimental.

>  
>          if (!strcmp(inout->name, "out"))
>              stream_idx = 0;
> -        else if (sscanf(inout->name, "out%d\n", &stream_idx) != 1) {
> +        else if (sscanf(inout->name, "out%d+subcc%n\n", &stream_idx, &use_subcc) != 1) {
>              av_log(avctx,  AV_LOG_ERROR,
>                     "Invalid outpad name '%s'\n", inout->name);

Stefano requested a stricter parsing here, and I have it in my tree.

I would do a quick git send-email, except I am pretty sure I messed up the
rebase.

I will be in touch when I can. Thanks for advancing this.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141203/132248ce/attachment.asc>


More information about the ffmpeg-devel mailing list