changeset 8924:b42265a3f170 libavcodec

Kill the magic field in xvmc structure.
author iive
date Sun, 15 Feb 2009 17:21:37 +0000
parents 7117ea11df1e
children 23051e3e9d25
files mpegvideo_xvmc.c xvmc.h
diffstat 2 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mpegvideo_xvmc.c	Sun Feb 15 16:54:02 2009 +0000
+++ b/mpegvideo_xvmc.c	Sun Feb 15 17:21:37 2009 +0000
@@ -38,7 +38,7 @@
 void ff_xvmc_init_block(MpegEncContext *s)
 {
     struct xvmc_pixfmt_render *render = (struct xvmc_pixfmt_render*)s->current_picture.data[2];
-    assert(render && render->magic_id == AV_XVMC_RENDER_MAGIC);
+    assert(render && render->unique_id == AV_XVMC_RENDER_MAGIC);
 
     s->block = (DCTELEM *)(render->data_blocks + render->next_free_data_block_num * 64);
 }
@@ -68,7 +68,7 @@
     const int mb_block_count = 4 + (1 << s->chroma_format);
 
     assert(avctx);
-    if (!render || render->magic_id != AV_XVMC_RENDER_MAGIC ||
+    if (!render || render->unique_id != AV_XVMC_RENDER_MAGIC ||
         !render->data_blocks || !render->mv_blocks) {
         av_log(avctx, AV_LOG_ERROR,
                "Render token doesn't look as expected.\n");
@@ -100,7 +100,7 @@
             next = (struct xvmc_pixfmt_render*)s->next_picture.data[2];
             if (!next)
                 return -1;
-            if (next->magic_id != AV_XVMC_RENDER_MAGIC)
+            if (next->unique_id != AV_XVMC_RENDER_MAGIC)
                 return -1;
             render->p_future_surface = next->p_surface;
             // no return here, going to set forward prediction
@@ -108,7 +108,7 @@
             last = (struct xvmc_pixfmt_render*)s->last_picture.data[2];
             if (!last)
                 last = render; // predict second field from the first
-            if (last->magic_id != AV_XVMC_RENDER_MAGIC)
+            if (last->unique_id != AV_XVMC_RENDER_MAGIC)
                 return -1;
             render->p_past_surface = last->p_surface;
             return 0;
@@ -162,7 +162,7 @@
     // start of XVMC-specific code
     render = (struct xvmc_pixfmt_render*)s->current_picture.data[2];
     assert(render);
-    assert(render->magic_id == AV_XVMC_RENDER_MAGIC);
+    assert(render->unique_id == AV_XVMC_RENDER_MAGIC);
     assert(render->mv_blocks);
 
     // take the next free macroblock
--- a/xvmc.h	Sun Feb 15 16:54:02 2009 +0000
+++ b/xvmc.h	Sun Feb 15 17:21:37 2009 +0000
@@ -38,7 +38,7 @@
     Once set these values are not supposed to be modified.
 */
 //@{
-    int             magic_id;                     ///< used as a check against memory corruption by regular pixel routines or other API structure
+    int             unique_id;                     ///< used as a check against memory corruption by regular pixel routines or other API structure
 
     short*          data_blocks;
     XvMCMacroBlock* mv_blocks;