From e8d387a345a41ac2085973c27ded9b000af9ea2e Mon Sep 17 00:00:00 2001 From: Michael Roitzsch Date: Sun, 30 May 2004 21:33:38 +0000 Subject: there are more image formats than YV12 and YUY2 -> fixes DXR3 crash CVS patchset: 6613 CVS date: 2004/05/30 21:33:38 --- ChangeLog | 1 + src/xine-engine/video_out.c | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8d0d3e047..f5392077d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,7 @@ (fixes parsing of reference/playlist files using http, eg .ram) * fix time displaying for flac files * fix playback of some broken ASF streams + * DXR3: fix crash after playing non-MPEG content xine-lib (1-rc4a) * audio out now uses a more user friendly "Speaker arrangement" config item; diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c index 0e8b7a7b5..6995b1f46 100644 --- a/src/xine-engine/video_out.c +++ b/src/xine-engine/video_out.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.c,v 1.195 2004/05/29 14:45:25 mroi Exp $ + * $Id: video_out.c,v 1.196 2004/05/30 21:33:39 mroi Exp $ * * frame allocation / queuing / scheduling / output functions */ @@ -586,7 +586,8 @@ static vo_frame_t * duplicate_frame( vos_t *this, vo_frame_t *img ) { image_size = img->pitches[0] * img->height; - if (img->format == XINE_IMGFMT_YV12) { + switch (img->format) { + case XINE_IMGFMT_YV12: yv12_to_yv12( /* Y */ img->base[0], img->pitches[0], @@ -599,7 +600,8 @@ static vo_frame_t * duplicate_frame( vos_t *this, vo_frame_t *img ) { dupl->base[2], dupl->pitches[2], /* width x height */ img->width, img->height); - } else { + break; + case XINE_IMGFMT_YUY2: yuy2_to_yuy2( /* src */ img->base[0], img->pitches[0], @@ -607,7 +609,8 @@ static vo_frame_t * duplicate_frame( vos_t *this, vo_frame_t *img ) { dupl->base[0], dupl->pitches[0], /* width x height */ img->width, img->height); - } + break; + } dupl->bad_frame = 0; dupl->pts = 0; -- cgit v1.2.3