|
From: strk <st...@ke...> - 2006-11-25 18:21:55
|
Alex, can you provide a testcase for the problem for inclusion
in the new testsuite ?
--strk;
On Wed, Nov 22, 2006 at 02:06:58PM -0800, Alex Curylo wrote:
> There's a bug in SWFDisplayList_writeBlocks() in displaylist.c which causes
> objects after a non-embedded video stream to not be written out. The
> problematic bit is
>
> /* for each videostream in movie add VideoFrame */
> if(character && ((SWFBlock)character)->type ==
> SWF_DEFINEVIDEOSTREAM) {
> SWFBlock video =
> SWFVideoStream_getVideoFrame((SWFVideoStream)character);
>
> if(!video)
> break;
>
> /* well it isn't really clear why we need the place-block here
> * its not metioned in the flash-specs
> * but its not working without */
> if((item->flags & ITEM_NEW) == 0)
> {
> frame =
> SWFVideoStream_getFrameNumber((SWFVideoFrame)video);
> placeVideo = newSWFPlaceObject2Block(item->depth);
> SWFPlaceObject2Block_setRatio(placeVideo, frame);
> SWFPlaceObject2Block_setMove(placeVideo);
> SWFBlockList_addBlock(blocklist, (SWFBlock)placeVideo);
> }
>
>
> SWFBlockList_addBlock(blocklist, video);
> }
>
> What happens if you're using NetStream instead of including the video
> directly is that SWFVideoStream_getVideoFrame() returns NULL, and the
> consequent break stops anything after the video canvas getting added.
>
> An easy fix is simply not breaking on NULL.
>
> if (NULL != video) // which it will be for streaming video
> {
> /* well it isn't really clear why we need the place-block
> here
> * its not metioned in the flash-specs
> * but its not working without */
> if((item->flags & ITEM_NEW) == 0)
> {
> frame =
> SWFVideoStream_getFrameNumber((SWFVideoFrame)video);
> placeVideo = newSWFPlaceObject2Block(item->depth);
> SWFPlaceObject2Block_setRatio(placeVideo, frame);
> SWFPlaceObject2Block_setMove(placeVideo);
> SWFBlockList_addBlock(blocklist, (SWFBlock)placeVideo);
> }
>
> SWFBlockList_addBlock(blocklist, video);
> }
>
> I presume a proper fix would involve figuring out whether the video stream
> is embedded or not to know if NULL is an expected return value, but it's not
> clear to me how to do that.
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Ming-devr mailing list
> Min...@li...
> https://lists.sourceforge.net/lists/listinfo/ming-devr
--
/"\ ASCII Ribbon Campaign
\ / Respect for low technology.
X Keep e-mail messages readable by any computer system.
/ \ Keep it ASCII.
|