[mythtv] [PATCH] replace printf in xvmcvld

Ivor Hewitt ivor at ivor.org
Mon Sep 13 06:28:38 EDT 2004


Replaced "fprintf"s with "av_log"s in xvmcvldvideo.c and xvmccommon.c to 
fix compile error.

-- 
Ivor.
http://ivor.org - Leylandii hedge,    http://ivor.it - Technology

-------------- next part --------------
Index: libs/libavcodec/xvmccommon.c
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libavcodec/xvmccommon.c,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 xvmccommon.c
--- libs/libavcodec/xvmccommon.c	13 Sep 2004 06:09:23 -0000	1.1
+++ libs/libavcodec/xvmccommon.c	13 Sep 2004 10:25:52 -0000
@@ -8,7 +8,7 @@ static XvMCSurface* findPastSurface(Mpeg
     if (NULL!=lastp) {
         last = (xvmc_render_state_t*)(lastp->data[2]);
         if (B_TYPE==last->pict_type)
-            fprintf(stderr, "Past frame is a B frame in findPastSurface, this is bad.\n");
+            av_log(s->avctx,AV_LOG_DEBUG, "Past frame is a B frame in findPastSurface, this is bad.\n");
         //assert(B_TYPE!=last->pict_type);
     }
 
@@ -32,7 +32,7 @@ static XvMCSurface* findFutureSurface(Mp
     if (NULL!=nextp) {
         next = (xvmc_render_state_t*)(nextp->data[2]);
         if (B_TYPE==next->pict_type)
-            fprintf(stderr, "Next frame is a B frame in findFutureSurface, thisis bad.\n");
+            av_log(s->avctx,AV_LOG_DEBUG, "Next frame is a B frame in findFutureSurface, thisis bad.\n");
         //assert(B_TYPE!=next->pict_type);
     }
 
Index: libs/libavcodec/xvmcvldvideo.c
===================================================================
RCS file: /var/lib/mythcvs/mythtv/libs/libavcodec/xvmcvldvideo.c,v
retrieving revision 1.1
diff -u -3 -p -u -r1.1 xvmcvldvideo.c
--- libs/libavcodec/xvmcvldvideo.c	13 Sep 2004 06:09:23 -0000	1.1
+++ libs/libavcodec/xvmcvldvideo.c	13 Sep 2004 10:25:53 -0000
@@ -68,14 +68,14 @@ int XVMC_VLD_field_start(MpegEncContext*
         render->p_past_surface = findPastSurface(s, render);
         render->p_future_surface = findFutureSurface(s);
         if (!render->p_past_surface)
-            fprintf(stderr, "error: decoding B frame and past frameis null!");
+            av_log(avctx, AV_LOG_ERROR, "error: decoding B frame and past frameis null!");
         else if (!render->p_future_surface)
-            fprintf(stderr, "error: decoding B frame and future frame is null!");
+            av_log(avctx, AV_LOG_ERROR, "error: decoding B frame and future frame is null!");
         break;
     case  P_TYPE:
         render->p_past_surface = findPastSurface(s, render);
         if (!render->p_past_surface)
-            fprintf(stderr, "error: decoding P frame and past frameis null!");
+            av_log(avctx, AV_LOG_ERROR, "error: decoding P frame and past frameis null!");
         break;
     }
 
@@ -114,7 +114,7 @@ int XVMC_VLD_field_start(MpegEncContext*
     case I_TYPE:    binfo.picture_coding_type = XVMC_I_PICTURE;     break;
     case P_TYPE:    binfo.picture_coding_type = XVMC_P_PICTURE;     break;
     case B_TYPE:    binfo.picture_coding_type = XVMC_B_PICTURE;     break;
-    default:    fprintf(stderr, "%s: Unknown picture coding type: %d\n", __FUNCTION__, s->pict_type);
+    default:    av_log(avctx, AV_LOG_ERROR, "%s: Unknown picture coding type: %d\n", __FUNCTION__, s->pict_type);
     }
 
     binfo.intra_dc_precision = s->intra_dc_precision;;
@@ -140,13 +140,13 @@ int XVMC_VLD_field_start(MpegEncContext*
 
     status = XvMCLoadQMatrix(render->disp, render->ctx, &qmatrix);
     if (status)
-        fprintf(stderr, "XvMCLoadQMatrix: Error: %d\n", status);
+        av_log(avctx,AV_LOG_ERROR, "XvMCLoadQMatrix: Error: %d\n", status);
 
     status = XvMCBeginSurface(render->disp, render->ctx, render->p_surface, 
                               render->p_past_surface, render->p_future_surface,
                               &binfo);
     if (status)
-        fprintf(stderr, "XvMCBeginSurface: Error: %d\n", status);
+        av_log(avctx,AV_LOG_ERROR, "XvMCBeginSurface: Error: %d\n", status);
 
     return 0;
 }


More information about the mythtv-dev mailing list