diff options
Diffstat (limited to 'src/video_out/video_out_syncfb.c')
-rw-r--r-- | src/video_out/video_out_syncfb.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/video_out/video_out_syncfb.c b/src/video_out/video_out_syncfb.c index 2ab83e291..8fcb91e41 100644 --- a/src/video_out/video_out_syncfb.c +++ b/src/video_out/video_out_syncfb.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: video_out_syncfb.c,v 1.72 2002/07/10 14:04:41 mroi Exp $ + * $Id: video_out_syncfb.c,v 1.73 2002/07/15 21:42:34 esnel Exp $ * * video_out_syncfb.c, SyncFB (for Matrox G200/G400 cards) interface for xine * @@ -682,13 +682,17 @@ static void syncfb_update_frame_format(vo_driver_t* this_gen, /* frame->vo_frame.base[0] = xine_xmalloc_aligned(16, frame_size, (void **)&frame->data_mem[0]); frame->vo_frame.base[1] = xine_xmalloc_aligned(16, frame_size/4, (void **)&frame->data_mem[1]); frame->vo_frame.base[2] = xine_xmalloc_aligned(16, frame_size/4, (void **)&frame->data_mem[2]);*/ - frame->vo_frame.base[0] = malloc(frame_size); - frame->vo_frame.base[1] = malloc(frame_size/4); - frame->vo_frame.base[2] = malloc(frame_size/4); + frame->vo_frame.pitches[0] = 8*((width + 7) / 8); + frame->vo_frame.pitches[1] = 8*((width + 15) / 16); + frame->vo_frame.pitches[2] = 8*((width + 15) / 16); + frame->vo_frame.base[0] = malloc(frame->vo_frame.pitches[0] * height); + frame->vo_frame.base[1] = malloc(frame->vo_frame.pitches[1] * ((height+1)/2)); + frame->vo_frame.base[2] = malloc(frame->vo_frame.pitches[2] * ((height+1)/2)); break; case IMGFMT_YUY2: /* frame->vo_frame.base[0] = xine_xmalloc_aligned(16, (frame_size*2), (void **)&frame->data_mem[0]);*/ - frame->vo_frame.base[0] = malloc(frame_size*2); + frame->vo_frame.pitches[0] = 8*((width + 3) / 4); + frame->vo_frame.base[0] = malloc(frame->vo_frame.pitches[0] * height); frame->vo_frame.base[1] = NULL; frame->vo_frame.base[2] = NULL; break; |