[FFmpeg-devel] [PATCH] movtextdec.c: Add support for highlight and hilightcolor box

Philip Langdale philipl at overt.org
Thu Jul 9 20:16:16 CEST 2015


On 2015-07-06 14:42, Clément Bœsch wrote:
> 
>>  {
>>      int i = 0;
>>      int text_pos = 0;
>>      while (text < text_end) {
>> -        for (i = 0; i < style_entries; i++) {
>> -            if (s[i]->style_flag && text_pos == s[i]->style_end) {
>> -                if (s[i]->style_flag & STYLE_FLAG_BOLD)
>> -                    av_bprintf(buf, "{\\b0}");
>> -                if (s[i]->style_flag & STYLE_FLAG_ITALIC)
>> -                    av_bprintf(buf, "{\\i0}");
>> -                if (s[i]->style_flag & STYLE_FLAG_UNDERLINE)
>> -                    av_bprintf(buf, "{\\u0}");
>> +        if (m->box_flags & STYL_BOX) {
> 
>> +            for (i = 0; i < m->style_entries; i++) {
>> +                if (m->s[i]->style_flag && text_pos == 
>> m->s[i]->style_end) {
>> +                    if (m->s[i]->style_flag & STYLE_FLAG_BOLD)
>> +                        av_bprintf(buf, "{\\b0}");
>> +                    if (m->s[i]->style_flag & STYLE_FLAG_ITALIC)
>> +                        av_bprintf(buf, "{\\i0}");
>> +                    if (m->s[i]->style_flag & STYLE_FLAG_UNDERLINE)
>> +                        av_bprintf(buf, "{\\u0}");
>> +                }
>> +            }
> 
> keep this block not re-idented (and eventually add a /* TODO: reindent 
> */
> above) to keep the diff small and ease review. You can re-indent in a
> later commit.

Do you really mean this? This is not a simple re-indent. The variables 
on those
lines are also changing? In which case, I'd include the re-indent at the 
same time.

--phil


More information about the ffmpeg-devel mailing list