[FFmpeg-devel] [PATCH 12/12] Added more logging
Traian Coza
traian.coza at gmail.com
Tue May 3 19:13:28 EEST 2022
---
fftools/text_to_bitmap.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
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;
--
2.34.1
More information about the ffmpeg-devel
mailing list