svnno****@sourc*****
svnno****@sourc*****
2011年 4月 7日 (木) 21:32:12 JST
Revision: 539 http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=539 Author: yoya Date: 2011-04-07 21:32:12 +0900 (Thu, 07 Apr 2011) Log Message: ----------- rebuild に失敗した tag があった時点で諦めて、その後ろの tag が処理されないのを修正 Modified Paths: -------------- trunk/src/swf_object.c trunk/src/swf_tag.c -------------- next part -------------- Modified: trunk/src/swf_object.c =================================================================== --- trunk/src/swf_object.c 2011-04-07 10:11:30 UTC (rev 538) +++ trunk/src/swf_object.c 2011-04-07 12:32:12 UTC (rev 539) @@ -244,9 +244,9 @@ int ret; for (tag = swf->tag_head; tag ; tag = tag->next) { ret = swf_tag_rebuild(tag, swf); - if (ret) { - return ret; - } + if (ret) { + return ret; + } } return 0; } Modified: trunk/src/swf_tag.c =================================================================== --- trunk/src/swf_tag.c 2011-04-07 10:11:30 UTC (rev 538) +++ trunk/src/swf_tag.c 2011-04-07 12:32:12 UTC (rev 539) @@ -213,21 +213,21 @@ swf_tag_rebuild(swf_tag_t *tag, struct swf_object_ *swf) { swf_tag_info_t *tag_info = NULL; swf_tag_detail_handler_t * detail_handler = NULL; - int ret; + void *detail; tag_info = get_swf_tag_info(tag->code); if ((tag_info == NULL) || (tag_info->detail_handler == NULL)) { - return 1; // no info + return 0; // no info } detail_handler = tag_info->detail_handler(); if (detail_handler == NULL) { - return 1; // no detail handler + return 0; // no detail handler } if ((detail_handler->input == NULL) || (detail_handler->output == NULL)) { - return 1; // no input or output handler + return 0; // no input or output handler } - ret = detail_handler->input(tag, swf); - if (ret) { - fprintf(stderr, "swf_tag_rebuild: detail_hander->input failed tag_no=%d\n", tag->code); + detail = swf_tag_create_input_detail(tag, swf); + if (detail == NULL) { + fprintf(stderr, "swf_tag_rebuild: swf_tag_create_input_detail failed tag->code=%d\n", tag->code); return 1; } free(tag->data);