[FFmpeg-devel] [PATCH 09/11] libzvbi-teletextdec: output ass subtitles instead of plain text

Marton Balint cus at passwd.hu
Sun Nov 10 21:13:03 CET 2013


On Sun, 10 Nov 2013, Marton Balint wrote:
> On Sun, 10 Nov 2013, Clément Bœsch wrote:
>> On Sat, Nov 09, 2013 at 01:06:38PM +0100, Marton Balint wrote:
>> [...]
>>>>> +{
>>>>> +    int ret;
>>>>> +    AVBPrint buf, buf2;
>>>>> +    const int ts_start    = av_rescale_q(ctx->pts, 
>>>>> AV_TIME_BASE_Q,        (AVRational){1, 100});
>>>>> +    const int ts_duration = av_rescale_q(ctx->sub_duration, 
>>>>> (AVRational){1, 1000}, (AVRational){1, 100});
>>>>> +
>>>> 
>>>>> +    av_bprint_init(&buf, 0, AV_BPRINT_SIZE_UNLIMITED);
>>>>> +    ff_ass_bprint_text_event(&buf, text, strlen(text), "", 0);
>>>>> +
>>>>> +    if (!av_bprint_is_complete(&buf)) {
>>>>> +        av_bprint_finalize(&buf, NULL);
>>>>> +        return AVERROR(ENOMEM);
>>>>> +    }
>>>> 
>>>> Sorry but what is this buf indirection for?
>>>> 
>> 
>> I was just wondering about the double ff_ass_* but didn't realized one
>> block was for the markup only and second one of ASS dialogs. You might
>> want to add a comment above each of the blocks.
>
> Okay, will do, thanks.
>

Hello Michael,

Please merge from my stable branch for the whole patchset:

a494757 libzvbi-teletextdec: support multiple teletext pages in a single packet
688652e libzvbi-teletextdec: fix indentation after last commit
b689b1f libzvbi-teletextdec: use option constants instead of strings
65fb59a libzvbi-teletextdec: use AVBPrint for whitespace cleanup
f148954 ass: factor out ff_ass_bprint_dialog
0f0a8d9 ass: fix error handling in ff_ass_add_subrect
b96325e ass: move text_event_to_ass from textdec.c to ass.c and export it
3c4b527 libzvbi-teletextdec: output ass subtitles instead of plain text
4947b06 libzvbi-teletextdec: dont ignore memory allocation error silently
c0479f0 libzvbi-teletextdec: propagate errors generated in page handler

Thanks,
Marton


More information about the ffmpeg-devel mailing list