]> git.sesse.net Git - casparcg/commitdiff
More nice printing.
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Fri, 23 Dec 2011 13:43:39 +0000 (13:43 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Fri, 23 Dec 2011 13:43:39 +0000 (13:43 +0000)
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/trunk@1934 362d55ac-95cf-4e76-9f9a-cbaa9c17b72d

modules/ffmpeg/ffmpeg.cpp
modules/ffmpeg/producer/ffmpeg_producer.cpp

index d8d1e61a4b8a3abc198e3c74a18ed0b0f8d12067..c11babbd1c6371bbd610f83e96bab675268a9c14 100644 (file)
@@ -135,6 +135,10 @@ void log_callback(void* ptr, int level, const char* fmt, va_list vl)
     //}\r
     strcpy(prev, line);\r
     sanitize((uint8_t*)line);\r
+\r
+       int len = strlen(line);\r
+       if(len > 0)\r
+               line[len-1] = 0;\r
        \r
        if(level == AV_LOG_DEBUG)\r
                CASPAR_LOG(debug) << L"[ffmpeg] " << line;\r
index df676718ceb19dfe15856828056897d5052e07a5..491b31c7f36a518c2f774ca8e62c854eef5d965b 100644 (file)
@@ -107,12 +107,12 @@ public:
                }\r
                catch(averror_stream_not_found&)\r
                {\r
-                       CASPAR_LOG(warning) << "No video-stream found. Running without video."; \r
+                       CASPAR_LOG(warning) << print() << " No video-stream found. Running without video.";     \r
                }\r
                catch(...)\r
                {\r
                        CASPAR_LOG_CURRENT_EXCEPTION();\r
-                       CASPAR_LOG(warning) << "Failed to open video-stream. Running without video.";   \r
+                       CASPAR_LOG(warning) << print() << "Failed to open video-stream. Running without video.";        \r
                }\r
 \r
                try\r
@@ -121,12 +121,12 @@ public:
                }\r
                catch(averror_stream_not_found&)\r
                {\r
-                       CASPAR_LOG(warning) << "No audio-stream found. Running without audio."; \r
+                       CASPAR_LOG(warning) << print() << " No audio-stream found. Running without audio.";     \r
                }\r
                catch(...)\r
                {\r
                        CASPAR_LOG_CURRENT_EXCEPTION();\r
-                       CASPAR_LOG(warning) << "Failed to open audio-stream. Running without audio.";           \r
+                       CASPAR_LOG(warning) << print() << " Failed to open audio-stream. Running without audio.";               \r
                }       \r
 \r
                if(!video_decoder_ && !audio_decoder_)\r