Created
July 28, 2020 07:11
-
-
Save prabindh/42217b1ba27135ade7b218ab0af03995 to your computer and use it in GitHub Desktop.
FFMPEG logging
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// av_log_set_callback(ffmpeg_avcodec_log); | |
static void ffmpeg_avcodec_log(void *ptr, int val, const char * msg, va_list | |
ap) | |
{ | |
AVClass* avc = ptr ? *(AVClass**)ptr : NULL; | |
FILE *flog = fopen("stream-receiver.log", "a"); | |
if (avc) | |
{ | |
fprintf(flog, "[%s @ %p] ", avc->item_name(ptr), avc); | |
} | |
vfprintf(flog, msg, ap); | |
fclose(flog); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment