diff options
Diffstat (limited to 'libvo/gl_common.c')
-rw-r--r-- | libvo/gl_common.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libvo/gl_common.c b/libvo/gl_common.c index 230e5dc2bd..b867af81b0 100644 --- a/libvo/gl_common.c +++ b/libvo/gl_common.c @@ -2587,3 +2587,19 @@ void uninit_mpglcontext(MPGLContext *ctx) } talloc_free(ctx); } + +void mp_log_source(int mod, int lev, const char *src) +{ + int line = 1; + if (!src) + return; + while (*src) { + const char *end = strchr(src, '\n'); + const char *next = end + 1; + if (!end) + next = end = src + strlen(src); + mp_msg(mod, lev, "[%3d] %.*s\n", line, (int)(end - src), src); + line++; + src = next; + } +} |