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

Clément Bœsch u at pkh.me
Sun Jul 12 09:33:46 CEST 2015


On Thu, Jul 09, 2015 at 11:16:16AM -0700, Philip Langdale wrote:
> 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.

Oups, my bad yeah.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150712/824e603b/attachment.sig>


More information about the ffmpeg-devel mailing list