comparison dvbsubdec.c @ 2833:1f117208d20f libavcodec

subs.diff fixes a couple of minor bugs in my DVB subtitle decoder, and also fixes a few problems in the DVD decoder (the palette entries were being read back-to-front, and the timing conversions were slighly off) patch by (Ian Caulfield: imc25, cam ac uk)
author michael
date Sun, 14 Aug 2005 01:15:27 +0000
parents 95c35706acbb
children ef2149182f1c
comparison
equal deleted inserted replaced
2832:89b92f0800ab 2833:1f117208d20f
1308 sub->end_display_time = ctx->time_out * 1000; 1308 sub->end_display_time = ctx->time_out * 1000;
1309 sub->format = 0; 1309 sub->format = 0;
1310 1310
1311 sub->num_rects = ctx->display_list_size; 1311 sub->num_rects = ctx->display_list_size;
1312 1312
1313 if (sub->num_rects == 0) 1313 if (sub->num_rects > 0)
1314 return 0; 1314 sub->rects = av_mallocz(sizeof(AVSubtitleRect) * sub->num_rects);
1315
1316 sub->rects = av_mallocz(sizeof(AVSubtitleRect) * sub->num_rects);
1317 1315
1318 i = 0; 1316 i = 0;
1319 1317
1320 for (display = ctx->display_list; display != NULL; display = display->next) { 1318 for (display = ctx->display_list; display != NULL; display = display->next) {
1321 region = get_region(ctx, display->region_id); 1319 region = get_region(ctx, display->region_id);
1445 av_log(avctx, AV_LOG_INFO, "Junk at end of packet\n"); 1443 av_log(avctx, AV_LOG_INFO, "Junk at end of packet\n");
1446 #endif 1444 #endif
1447 return -1; 1445 return -1;
1448 } 1446 }
1449 1447
1450 return 0; 1448 return buf_size;
1451 } 1449 }
1452 1450
1453 1451
1454 AVCodec dvbsub_decoder = { 1452 AVCodec dvbsub_decoder = {
1455 "dvbsub", 1453 "dvbsub",