diff mbox series

[FFmpeg-devel,12/12] Added more logging

Message ID 20220503161328.842587-13-traian.coza@gmail.com
State New
Headers show
Series I added text to bitmap subtitle conversion functionality! | expand

Checks

Context Check Description
andriy/commit_msg_x86 warning The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ".
yinshiyou/commit_msg_loongarch64 warning The first line of the commit message must start with a context terminated by a colon and a space, for example "lavu/opt: " or "doc: ".
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Traian Coza May 3, 2022, 4:13 p.m. UTC
---
 fftools/text_to_bitmap.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/fftools/text_to_bitmap.c b/fftools/text_to_bitmap.c
index 0f165e7722..e05e485713 100644
--- a/fftools/text_to_bitmap.c
+++ b/fftools/text_to_bitmap.c
@@ -122,7 +122,8 @@  void init_ass_context(InputStream *ist, OutputStream *ost)
             }
         if (width && height) break;
 
-        // TODO Error: Cannot render without a width and height
+        av_log(NULL, AV_LOG_ERROR, "Cannot render text subtitle without frame size\n");
+        return;
     } while (0);
 
     context->renderer = ass_renderer_init(context->library);
@@ -197,7 +198,8 @@  void render_avsub_ass(ASS_Context *context, AVSubtitle *sub)
 
         ASS_Image *image = ass_render_frame(context->renderer, track,
             track->events[0].Start + track->events[0].Duration / 2, NULL);
-        if (image == NULL) av_log(NULL, AV_LOG_WARNING, "failed to render ass\n");
+        if (image == NULL) av_log(NULL, AV_LOG_WARNING,
+            "failed to render ass: %s\n", rect->ass);
 
         rect->x = image ? image->dst_x : 0; rect->w = 0;
         rect->y = image ? image->dst_y : 0; rect->h = 0;