]> rtime.felk.cvut.cz Git - frescor/ffmpeg.git/commitdiff
printf-> av_log patch by (Benjamin Larsson, banan: student ltu se)
authormichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 13 Jul 2005 10:18:35 +0000 (10:18 +0000)
committermichael <michael@9553f0bf-9b14-0410-a0b8-cfaf0461ba5b>
Wed, 13 Jul 2005 10:18:35 +0000 (10:18 +0000)
git-svn-id: file:///var/local/repositories/ffmpeg/trunk@4437 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b

libavformat/framehook.c
libavformat/sierravmd.c
libavformat/udp.c

index ee390e4d99166b9743c76b65a9c7190d02f23831..18be8a753e68964525b3afad23a326ba37677388 100644 (file)
@@ -49,7 +49,7 @@ int frame_hook_add(int argc, char *argv[])
 
     loaded = dlopen(argv[0], RTLD_NOW);
     if (!loaded) {
-        fprintf(stderr, "%s\n", dlerror());
+        av_log(NULL, AV_LOG_ERROR, "%s\n", dlerror());
         return -1;
     }
 
@@ -63,18 +63,18 @@ int frame_hook_add(int argc, char *argv[])
     fhe->Release = dlsym(loaded, "Release");    /* Optional */
 
     if (!fhe->Process) {
-        fprintf(stderr, "Failed to find Process entrypoint in %s\n", argv[0]);
+        av_log(NULL, AV_LOG_ERROR, "Failed to find Process entrypoint in %s\n", argv[0]);
         return -1;
     }
 
     if (!fhe->Configure && argc > 1) {
-        fprintf(stderr, "Failed to find Configure entrypoint in %s\n", argv[0]);
+        av_log(NULL, AV_LOG_ERROR, "Failed to find Configure entrypoint in %s\n", argv[0]);
         return -1;
     }
 
     if (argc > 1 || fhe->Configure) {
         if (fhe->Configure(&fhe->ctx, argc, argv)) {
-            fprintf(stderr, "Failed to Configure %s\n", argv[0]);
+            av_log(NULL, AV_LOG_ERROR, "Failed to Configure %s\n", argv[0]);
             return -1;
         }
     }
@@ -86,7 +86,7 @@ int frame_hook_add(int argc, char *argv[])
 
     return 0;
 #else
-    fprintf(stderr, "Video hooking not compiled into this version\n");
+    av_log(NULL, AV_LOG_ERROR, "Video hooking not compiled into this version\n");
     return 1;
 #endif
 }
index 152b4fb8f71fc00fd01cbf9359fd82cead1fd28b..09b7a7491a8e97c7953428be639cae09c031bbaf 100644 (file)
@@ -290,7 +290,7 @@ static int vmd_read_packet(AVFormatContext *s,
             pkt->data, pkt->size, vmd->audio_block_align);
 
     }
-printf (" dispatching %s frame with %d bytes and pts %lld (%0.1f sec)\n",
+av_log(NULL, AV_LOG_INFO, " dispatching %s frame with %d bytes and pts %lld (%0.1f sec)\n",
   (frame->frame_record[0] == 0x02) ? "video" : "audio",
   frame->frame_size + BYTES_PER_FRAME_RECORD,
   pkt->pts, (float)(pkt->pts / 90000.0));
index 8b5fc32a2c38e96070f3c65f68067467c060a60c..50aa14bfaf032644354de6b362d272d0a484625a 100644 (file)
@@ -133,7 +133,7 @@ struct addrinfo* udp_ipv6_resolve_host(const char *hostname, int port, int type,
         hints.ai_family   = family;
         hints.ai_flags = flags; 
         if ((error = getaddrinfo(node, service, &hints, &res))) {
-            fprintf(stderr, "udp_ipv6_resolve_host: %s\n", gai_strerror(error));
+            av_log(NULL, AV_LOG_ERROR, "udp_ipv6_resolve_host: %s\n", gai_strerror(error));
         }
     }
     return res;