changeset 5118:378d60504938

printf to mp_msg by Anders Rune Jensen
author alex
date Fri, 15 Mar 2002 23:16:32 +0000
parents aae821975923
children 636b20788503
files dec_audio.c
diffstat 1 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/dec_audio.c	Fri Mar 15 23:15:36 2002 +0000
+++ b/dec_audio.c	Fri Mar 15 23:16:32 2002 +0000
@@ -174,7 +174,7 @@
     }
     if (skipped)
     {
-	printf("Audio synced, skipped bytes: %d\n", skipped);
+	mp_msg(MSGT_DECAUDIO, MSGL_INFO, "mad: audio synced, skipped bytes: %d\n", skipped);
 //	ms->skiplen += skipped;
 //	printf("skiplen: %d (skipped: %d)\n", ms->skiplen, skipped);
 
@@ -199,7 +199,7 @@
     len = mad_stream_sync(&ms);
     if (len == -1)
     {
-	printf("Mad sync failed\n");
+	mp_msg(MSGT_DECVIDEO, MSGL_ERR, "Mad sync failed\n");
     }
 #endif
 }
@@ -467,7 +467,7 @@
 
 #ifdef USE_LIBMAD
  case AFM_MAD:
-   printf(__FILE__ ":%d:mad: setting minimum outputsize\n", __LINE__);
+   mp_msg(MSGT_DECVIDEO, MSGL_V, "mad: setting minimum outputsize\n");
    sh_audio->audio_out_minsize=4608;
    if(sh_audio->audio_in_minsize<MAD_SINGLE_BUFFER_SIZE) sh_audio->audio_in_minsize=MAD_SINGLE_BUFFER_SIZE;
    sh_audio->a_in_buffer_size=sh_audio->audio_in_minsize;
@@ -882,11 +882,11 @@
    {
      printf("%s %s %s (%s)\n", mad_version, mad_copyright, mad_author, mad_build);
 
-     printf(__FILE__ ":%d:mad: initialising\n", __LINE__);
+     mp_msg(MSGT_DECVIDEO, MSGL_V, "mad: initialising\n");
      mad_frame_init(&mad_frame);
      mad_stream_init(&mad_stream);
 
-     printf(__FILE__ ":%d:mad: preparing buffer\n", __LINE__);
+     mp_msg(MSGT_DECVIDEO, MSGL_V, "mad: preparing buffer\n");
      mad_prepare_buffer(sh_audio, &mad_stream, sh_audio->a_in_buffer_size);
      mad_stream_buffer(&mad_stream, (unsigned char*)(sh_audio->a_in_buffer), sh_audio->a_in_buffer_len);
 //     mad_stream_sync(&mad_stream);
@@ -895,12 +895,12 @@
 
      if(mad_frame_decode(&mad_frame, &mad_stream) == 0)
        {
-	 printf(__FILE__ ":%d:mad: post processing buffer\n", __LINE__);
+	 mp_msg(MSGT_DECVIDEO, MSGL_V, "mad: post processing buffer\n");
 	 mad_postprocess_buffer(sh_audio, &mad_stream);
        }
      else
        {
-	 printf(__FILE__ ":%d:mad: frame decoding failed\n", __LINE__);
+	 mp_msg(MSGT_DECVIDEO, MSGL_V, "mad: frame decoding failed\n");
 	 mad_print_error(&mad_stream);
        }
      
@@ -926,7 +926,7 @@
      sh_audio->samplerate=mad_frame.header.sfreq;
 #endif
      sh_audio->i_bps=mad_frame.header.bitrate;
-     printf(__FILE__ ":%d:mad: continuing\n", __LINE__);
+     mp_msg(MSGT_DECVIDEO, MSGL_V, "mad: continuing\n");
      break;
    }
 #endif
@@ -1318,7 +1318,7 @@
 	  }
 	else
 	  {
-	    printf(__FILE__ ":%d:mad: frame decoding failed (error: %d)\n", __LINE__,
+	    mp_msg(MSGT_DECVIDEO, MSGL_ERR, "mad: frame decoding failed (error: %d)\n",
 		mad_stream.error);
 	    mad_print_error(&mad_stream);
 	  }