[Redbutton-devel] SF.net SVN: redbutton: [72] redbutton-browser/trunk/MHEGStreamPlayer.c
Brought to you by:
skilvington
|
From: <ski...@us...> - 2006-05-22 12:49:33
|
Revision: 72 Author: skilvington Date: 2006-05-22 05:49:25 -0700 (Mon, 22 May 2006) ViewCVS: http://svn.sourceforge.net/redbutton/?rev=72&view=rev Log Message: ----------- cope with video changing size mid-stream Modified Paths: -------------- redbutton-browser/trunk/MHEGStreamPlayer.c Modified: redbutton-browser/trunk/MHEGStreamPlayer.c =================================================================== --- redbutton-browser/trunk/MHEGStreamPlayer.c 2006-05-22 08:31:19 UTC (rev 71) +++ redbutton-browser/trunk/MHEGStreamPlayer.c 2006-05-22 12:49:25 UTC (rev 72) @@ -354,19 +354,6 @@ /* initialise the video output method */ MHEGVideoOutput_init(&vo); - /* size of first frame, no need to lock as item won't change */ - out_width = p->videoq->item.width; - out_height = p->videoq->item.height; -/* TODO */ -/* use scaled values if ScaleVideo has been called */ - /* scale up if fullscreen */ - if(d->fullscreen) - { - out_width = (out_width * d->xres) / MHEG_XRES; - out_height = (out_height * d->yres) / MHEG_YRES; - } - - /* the time that we displayed the previous frame */ last_time = 0; last_pts = 0; @@ -413,6 +400,16 @@ if(!drop_frame) { /* scale the next frame if necessary */ + out_width = vf->width; + out_height = vf->height; +/* TODO */ +/* use scaled values if ScaleVideo has been called */ + /* scale up if fullscreen */ + if(d->fullscreen) + { + out_width = (out_width * d->xres) / MHEG_XRES; + out_height = (out_height * d->yres) / MHEG_YRES; + } MHEGVideoOutput_prepareFrame(&vo, vf, out_width, out_height); /* wait until it's time to display the frame */ now = av_gettime(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |