Revision 1fcef408

View differences:

libavcodec/mpegvideo_xvmc.c
41 41
void ff_xvmc_init_block(MpegEncContext *s)
42 42
{
43 43
    struct xvmc_pix_fmt *render = (struct xvmc_pix_fmt*)s->current_picture.data[2];
44
    assert(render && render->unique_id == AV_XVMC_RENDER_MAGIC);
44
    assert(render && render->xvmc_id == AV_XVMC_RENDER_MAGIC);
45 45

  
46 46
    s->block = (DCTELEM *)(render->data_blocks + render->next_free_data_block_num * 64);
47 47
}
......
76 76
    const int mb_block_count = 4 + (1 << s->chroma_format);
77 77

  
78 78
    assert(avctx);
79
    if (!render || render->unique_id != AV_XVMC_RENDER_MAGIC ||
79
    if (!render || render->xvmc_id != AV_XVMC_RENDER_MAGIC ||
80 80
        !render->data_blocks || !render->mv_blocks) {
81 81
        av_log(avctx, AV_LOG_ERROR,
82 82
               "Render token doesn't look as expected.\n");
......
108 108
            next = (struct xvmc_pix_fmt*)s->next_picture.data[2];
109 109
            if (!next)
110 110
                return -1;
111
            if (next->unique_id != AV_XVMC_RENDER_MAGIC)
111
            if (next->xvmc_id != AV_XVMC_RENDER_MAGIC)
112 112
                return -1;
113 113
            render->p_future_surface = next->p_surface;
114 114
            // no return here, going to set forward prediction
......
116 116
            last = (struct xvmc_pix_fmt*)s->last_picture.data[2];
117 117
            if (!last)
118 118
                last = render; // predict second field from the first
119
            if (last->unique_id != AV_XVMC_RENDER_MAGIC)
119
            if (last->xvmc_id != AV_XVMC_RENDER_MAGIC)
120 120
                return -1;
121 121
            render->p_past_surface = last->p_surface;
122 122
            return 0;
......
176 176
    // start of XVMC-specific code
177 177
    render = (struct xvmc_pix_fmt*)s->current_picture.data[2];
178 178
    assert(render);
179
    assert(render->unique_id == AV_XVMC_RENDER_MAGIC);
179
    assert(render->xvmc_id == AV_XVMC_RENDER_MAGIC);
180 180
    assert(render->mv_blocks);
181 181

  
182 182
    // take the next free macroblock
libavcodec/xvmc.h
38 38
    Once set these values are not supposed to be modified.
39 39
*/
40 40
//@{
41
    int             unique_id;                     ///< used as a check against memory corruption by regular pixel routines or other API structure
41
    int             xvmc_id;                      ///< used as a check against memory corruption by regular pixel routines or other API structure
42 42

  
43 43
    short*          data_blocks;
44 44
    XvMCMacroBlock* mv_blocks;

Also available in: Unified diff