summaryrefslogtreecommitdiffstats
path: root/libmpdemux
diff options
context:
space:
mode:
authoralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-02 10:40:35 +0000
committeralbeu <albeu@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-05-02 10:40:35 +0000
commit4189e063963a7fa868635cff9ff5250190b043d2 (patch)
tree4683456981781b515082fe2b4abbc210ba057099 /libmpdemux
parentae15bf12fdb68934a4ef471e6fc7fd7da35545f9 (diff)
downloadmpv-4189e063963a7fa868635cff9ff5250190b043d2.tar.bz2
mpv-4189e063963a7fa868635cff9ff5250190b043d2.tar.xz
printf to mp_msg
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5934 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux')
-rw-r--r--libmpdemux/aviheader.c4
-rw-r--r--libmpdemux/url.c13
2 files changed, 9 insertions, 8 deletions
diff --git a/libmpdemux/aviheader.c b/libmpdemux/aviheader.c
index fba8b324f3..17ae40a019 100644
--- a/libmpdemux/aviheader.c
+++ b/libmpdemux/aviheader.c
@@ -50,7 +50,7 @@ while(1){
id=stream_read_dword_le(demuxer->stream); // list type
mp_msg(MSGT_HEADER,MSGL_DBG2,"LIST %.4s len=%d\n",(char *) &id,len);
list_end=stream_tell(demuxer->stream)+((len+1)&(~1));
- printf("list_end=0x%X\n",(int)list_end);
+ mp_msg(MSGT_HEADER,MSGL_V,"list_end=0x%X\n",(int)list_end);
if(id==listtypeAVIMOVIE){
// found MOVI header
if(!demuxer->movi_start) demuxer->movi_start=stream_tell(demuxer->stream);
@@ -247,7 +247,7 @@ while(1){
}
}
if(hdr){
- printf("hdr=%s size=%d\n",hdr,size2);
+ mp_msg(MSGT_HEADER,MSGL_V,"hdr=%s size=%d\n",hdr,size2);
if(size2==3)
chunksize=1; // empty
else {
diff --git a/libmpdemux/url.c b/libmpdemux/url.c
index a8c6fd064c..a8190f1fb9 100644
--- a/libmpdemux/url.c
+++ b/libmpdemux/url.c
@@ -12,6 +12,7 @@
#include <stdio.h>
#include "url.h"
+#include "mp_msg.h"
URL_t*
url_new(char* url) {
@@ -24,7 +25,7 @@ url_new(char* url) {
// Create the URL container
Curl = (URL_t*)malloc(sizeof(URL_t));
if( Curl==NULL ) {
- printf("Memory allocation failed!\n");
+ mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed!\n");
return NULL;
}
// Initialisation of the URL container members
@@ -33,14 +34,14 @@ url_new(char* url) {
// Copy the url in the URL container
Curl->url = strdup(url);
if( Curl->url==NULL ) {
- printf("Memory allocation failed!\n");
+ mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed!\n");
return NULL;
}
// extract the protocol
ptr1 = strstr(url, "://");
if( ptr1==NULL ) {
- printf("Not an URL!\n");
+ mp_msg(MSGT_NETWORK,MSGL_V,"Not an URL!\n");
return NULL;
}
pos1 = ptr1-url;
@@ -74,7 +75,7 @@ url_new(char* url) {
// copy the hostname in the URL container
Curl->hostname = (char*)malloc(pos2-pos1-3+1);
if( Curl->hostname==NULL ) {
- printf("Memory allocation failed!\n");
+ mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed!\n");
return NULL;
}
strncpy(Curl->hostname, ptr1+3, pos2-pos1-3);
@@ -89,7 +90,7 @@ url_new(char* url) {
// copy the path/filename in the URL container
Curl->file = strdup(ptr2);
if( Curl->file==NULL ) {
- printf("Memory allocation failed!\n");
+ mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed!\n");
return NULL;
}
}
@@ -98,7 +99,7 @@ url_new(char* url) {
if( Curl->file==NULL ) {
Curl->file = (char*)malloc(2);
if( Curl->file==NULL ) {
- printf("Memory allocation failed!\n");
+ mp_msg(MSGT_NETWORK,MSGL_FATAL,"Memory allocation failed!\n");
return NULL;
}
strcpy(Curl->file, "/");