Skip to content

Commit 882fa5a

Browse files
committed
c++: prefix log messages with jso
This makes it easier to pick them out in the browser console and is less confusing then prefixing with libass as some did before.
1 parent dfada30 commit 882fa5a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

src/SubtitleOctopus.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -116,15 +116,15 @@ class SubtitleOctopus {
116116
void initLibrary(int frame_w, int frame_h) {
117117
ass_library = ass_library_init();
118118
if (!ass_library) {
119-
fprintf(stderr, "ass_library_init failed!\n");
119+
fprintf(stderr, "jso: ass_library_init failed!\n");
120120
exit(2);
121121
}
122122

123123
ass_set_message_cb(ass_library, msg_callback, NULL);
124124

125125
ass_renderer = ass_renderer_init(ass_library);
126126
if (!ass_renderer) {
127-
fprintf(stderr, "ass_renderer_init failed!\n");
127+
fprintf(stderr, "jso: ass_renderer_init failed!\n");
128128
exit(3);
129129
}
130130

@@ -139,7 +139,7 @@ class SubtitleOctopus {
139139
removeTrack();
140140
track = ass_read_file(ass_library, subfile, NULL);
141141
if (!track) {
142-
fprintf(stderr, "Failed to start a track\n");
142+
fprintf(stderr, "jso: Failed to start a track\n");
143143
exit(4);
144144
}
145145
}
@@ -148,7 +148,7 @@ class SubtitleOctopus {
148148
removeTrack();
149149
track = ass_read_memory(ass_library, buf, (size_t)bufsize, NULL);
150150
if (!track) {
151-
fprintf(stderr, "Failed to start a track\n");
151+
fprintf(stderr, "jso: Failed to start a track\n");
152152
exit(4);
153153
}
154154
}
@@ -230,7 +230,7 @@ class SubtitleOctopus {
230230
}
231231

232232
void setMemoryLimits(int glyph_limit, int bitmap_cache_limit) {
233-
printf("libass: setting total libass memory limits to: glyph=%d MiB, bitmap cache=%d MiB\n",
233+
printf("jso: setting total libass memory limits to: glyph=%d MiB, bitmap cache=%d MiB\n",
234234
glyph_limit, bitmap_cache_limit);
235235
ass_set_cache_limits(ass_renderer, glyph_limit, bitmap_cache_limit);
236236
}
@@ -270,7 +270,7 @@ class SubtitleOctopus {
270270
// make float buffer for blending
271271
float* buf = (float*)buffer_resize(&m_blend, sizeof(float) * width * height * 4, 0);
272272
if (buf == NULL) {
273-
fprintf(stderr, "libass: cannot allocate buffer for blending\n");
273+
fprintf(stderr, "jso: cannot allocate buffer for blending\n");
274274
return &m_blendResult;
275275
}
276276
memset(buf, 0, sizeof(float) * width * height * 4);

0 commit comments

Comments
 (0)