comparison dvbsubdec.c @ 5932:d457f0c01ec5 libavcodec

cosmetic (x==NULL -> !x)
author michael
date Mon, 19 Nov 2007 20:33:25 +0000
parents 3bb292a4ae12
children 1900b70712ab
comparison
equal deleted inserted replaced
5931:3bb292a4ae12 5932:d457f0c01ec5
283 } 283 }
284 284
285 if (obj_disp) { 285 if (obj_disp) {
286 *obj_disp_ptr = obj_disp->object_list_next; 286 *obj_disp_ptr = obj_disp->object_list_next;
287 287
288 if (object->display_list == NULL) { 288 if (!object->display_list) {
289 obj2 = ctx->object_list; 289 obj2 = ctx->object_list;
290 obj2_ptr = &ctx->object_list; 290 obj2_ptr = &ctx->object_list;
291 291
292 while (obj2 && obj2 != object) { 292 while (obj2 && obj2 != object) {
293 obj2_ptr = &obj2->next; 293 obj2_ptr = &obj2->next;
922 clut_id = *buf++; 922 clut_id = *buf++;
923 buf += 1; 923 buf += 1;
924 924
925 clut = get_clut(ctx, clut_id); 925 clut = get_clut(ctx, clut_id);
926 926
927 if (clut == NULL) { 927 if (!clut) {
928 clut = av_malloc(sizeof(DVBSubCLUT)); 928 clut = av_malloc(sizeof(DVBSubCLUT));
929 929
930 memcpy(clut, &default_clut, sizeof(DVBSubCLUT)); 930 memcpy(clut, &default_clut, sizeof(DVBSubCLUT));
931 931
932 clut->id = clut_id; 932 clut->id = clut_id;
998 998
999 region_id = *buf++; 999 region_id = *buf++;
1000 1000
1001 region = get_region(ctx, region_id); 1001 region = get_region(ctx, region_id);
1002 1002
1003 if (region == NULL) { 1003 if (!region) {
1004 region = av_mallocz(sizeof(DVBSubRegion)); 1004 region = av_mallocz(sizeof(DVBSubRegion));
1005 1005
1006 region->id = region_id; 1006 region->id = region_id;
1007 1007
1008 region->next = ctx->region_list; 1008 region->next = ctx->region_list;
1062 object_id = AV_RB16(buf); 1062 object_id = AV_RB16(buf);
1063 buf += 2; 1063 buf += 2;
1064 1064
1065 object = get_object(ctx, object_id); 1065 object = get_object(ctx, object_id);
1066 1066
1067 if (object == NULL) { 1067 if (!object) {
1068 object = av_mallocz(sizeof(DVBSubObject)); 1068 object = av_mallocz(sizeof(DVBSubObject));
1069 1069
1070 object->id = object_id; 1070 object->id = object_id;
1071 object->next = ctx->object_list; 1071 object->next = ctx->object_list;
1072 ctx->object_list = object; 1072 ctx->object_list = object;
1136 while (display && display->region_id != region_id) { 1136 while (display && display->region_id != region_id) {
1137 tmp_ptr = &display->next; 1137 tmp_ptr = &display->next;
1138 display = display->next; 1138 display = display->next;
1139 } 1139 }
1140 1140
1141 if (display == NULL) 1141 if (!display)
1142 display = av_mallocz(sizeof(DVBSubRegionDisplay)); 1142 display = av_mallocz(sizeof(DVBSubRegionDisplay));
1143 1143
1144 display->region_id = region_id; 1144 display->region_id = region_id;
1145 1145
1146 display->x_pos = AV_RB16(buf); 1146 display->x_pos = AV_RB16(buf);
1291 1291
1292 for (display = ctx->display_list; display; display = display->next) { 1292 for (display = ctx->display_list; display; display = display->next) {
1293 region = get_region(ctx, display->region_id); 1293 region = get_region(ctx, display->region_id);
1294 rect = &sub->rects[i]; 1294 rect = &sub->rects[i];
1295 1295
1296 if (region == NULL) 1296 if (!region)
1297 continue; 1297 continue;
1298 1298
1299 rect->x = display->x_pos; 1299 rect->x = display->x_pos;
1300 rect->y = display->y_pos; 1300 rect->y = display->y_pos;
1301 rect->w = region->width; 1301 rect->w = region->width;
1303 rect->nb_colors = 16; 1303 rect->nb_colors = 16;
1304 rect->linesize = region->width; 1304 rect->linesize = region->width;
1305 1305
1306 clut = get_clut(ctx, region->clut); 1306 clut = get_clut(ctx, region->clut);
1307 1307
1308 if (clut == NULL) 1308 if (!clut)
1309 clut = &default_clut; 1309 clut = &default_clut;
1310 1310
1311 switch (region->depth) { 1311 switch (region->depth) {
1312 case 2: 1312 case 2:
1313 clut_table = clut->clut4; 1313 clut_table = clut->clut4;