Mercurial > libavcodec.hg
changeset 8844:9ea7195b2ed4 libavcodec
Replace all (x == NULL) or (x != NULL) in assert and if conditions by !x and x.
author | diego |
---|---|
date | Sat, 14 Feb 2009 17:04:09 +0000 |
parents | 00c1d62c3852 |
children | aee8c48ff4b0 |
files | mpegvideo_xvmc.c |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/mpegvideo_xvmc.c Sat Feb 14 16:54:53 2009 +0000 +++ b/mpegvideo_xvmc.c Sat Feb 14 17:04:09 2009 +0000 @@ -40,8 +40,8 @@ { struct xvmc_render_state * render; render = (struct xvmc_render_state*)s->current_picture.data[2]; - assert(render != NULL); - if ((render == NULL) || (render->magic != MP_XVMC_RENDER_MAGIC)) { + assert(render); + if (!render || (render->magic != MP_XVMC_RENDER_MAGIC)) { assert(0); return;//make sure that this is a render packet } @@ -71,11 +71,11 @@ { struct xvmc_render_state * render, * last, * next; - assert(avctx != NULL); + assert(avctx); render = (struct xvmc_render_state*)s->current_picture.data[2]; - assert(render != NULL); - if ((render == NULL) || (render->magic != MP_XVMC_RENDER_MAGIC)) + assert(render); + if (!render || (render->magic != MP_XVMC_RENDER_MAGIC)) return -1;//make sure that this is render packet render->picture_structure = s->picture_structure; @@ -92,8 +92,8 @@ return 0;// no prediction from other frames case FF_B_TYPE: next = (struct xvmc_render_state*)s->next_picture.data[2]; - assert(next!=NULL); - if (next == NULL) + assert(next); + if (!next) return -1; if (next->magic != MP_XVMC_RENDER_MAGIC) return -1; @@ -101,7 +101,7 @@ //no return here, going to set forward prediction case FF_P_TYPE: last = (struct xvmc_render_state*)s->last_picture.data[2]; - if (last == NULL)// && !s->first_field) + if (!last)// && !s->first_field) last = render;//predict second field from the first if (last->magic != MP_XVMC_RENDER_MAGIC) return -1; @@ -116,7 +116,7 @@ { struct xvmc_render_state * render; render = (struct xvmc_render_state*)s->current_picture.data[2]; - assert(render != NULL); + assert(render); if (render->filled_mv_blocks_num > 0) ff_draw_horiz_band(s,0,0); @@ -154,7 +154,7 @@ //START OF XVMC specific code render = (struct xvmc_render_state*)s->current_picture.data[2]; - assert(render!=NULL); + assert(render); assert(render->magic==MP_XVMC_RENDER_MAGIC); assert(render->mv_blocks);