diff options
author | Mike Lampard <mlampard@users.sourceforge.net> | 2001-10-24 13:42:58 +0000 |
---|---|---|
committer | Mike Lampard <mlampard@users.sourceforge.net> | 2001-10-24 13:42:58 +0000 |
commit | bcfe1227d726bdc7bb2e71bab13f7836d5affa28 (patch) | |
tree | 80b1b6f1d83935fda085f6ca95f7d5c8a66f4b8b | |
parent | 47f4ca0777be5b4adf75dc49941fd0d553c1afc3 (diff) | |
download | xine-lib-bcfe1227d726bdc7bb2e71bab13f7836d5affa28.tar.gz xine-lib-bcfe1227d726bdc7bb2e71bab13f7836d5affa28.tar.bz2 |
Exit nicely with a message if the user tries to play a non-mpeg stream,
instead of just seg-faulting...
CVS patchset: 874
CVS date: 2001/10/24 13:42:58
-rw-r--r-- | src/dxr3/dxr3_decoder.c | 4 | ||||
-rw-r--r-- | src/dxr3/video_out_dxr3.c | 34 |
2 files changed, 23 insertions, 15 deletions
diff --git a/src/dxr3/dxr3_decoder.c b/src/dxr3/dxr3_decoder.c index b30a76d31..c5c6240af 100644 --- a/src/dxr3/dxr3_decoder.c +++ b/src/dxr3/dxr3_decoder.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: dxr3_decoder.c,v 1.19 2001/10/23 15:20:35 mlampard Exp $ + * $Id: dxr3_decoder.c,v 1.20 2001/10/24 13:42:58 mlampard Exp $ * * dxr3 video and spu decoder plugin. Accepts the video and spu data * from XINE and sends it directly to the corresponding dxr3 devices. @@ -240,7 +240,7 @@ static void find_aspect(dxr3_decoder_t *this, uint8_t * buffer) if (old_h!=this->height || old_w!=this->width || old_a!=this->aspect) this->video_out->get_frame(this->video_out, this->width,this->height,this->aspect, - IMGFMT_YV12, 1, VO_BOTH_FIELDS); + IMGFMT_YV12, 1, 6667); } } diff --git a/src/dxr3/video_out_dxr3.c b/src/dxr3/video_out_dxr3.c index 7ab2cf9b5..f8bb8cbf6 100644 --- a/src/dxr3/video_out_dxr3.c +++ b/src/dxr3/video_out_dxr3.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_dxr3.c,v 1.13 2001/10/24 09:28:26 mlampard Exp $ + * $Id: video_out_dxr3.c,v 1.14 2001/10/24 13:42:58 mlampard Exp $ * * Dummy video out plugin for the dxr3. Is responsible for setting * tv_mode, bcs values and the aspectratio. @@ -203,18 +203,26 @@ static void dxr3_update_frame_format (vo_driver_t *this_gen, int ratio_code, int format, int flags) { dxr3_driver_t *this = (dxr3_driver_t *) this_gen; - - int aspect; - this->video_width = width; - this->video_height = height; - this->video_aspect = ratio_code; - - if (ratio_code < 3 || ratio_code>4) - aspect = ASPECT_FULL; - else - aspect = ASPECT_ANAMORPHIC; - if(this->aspectratio!=aspect) - dxr3_set_property (this_gen, VO_PROP_ASPECT_RATIO, aspect); + if(flags == 6667){ /* dxr3 flag anyone? :) */ + int aspect; + this->video_width = width; + this->video_height = height; + this->video_aspect = ratio_code; + + if (ratio_code < 3 || ratio_code>4) + aspect = ASPECT_FULL; + else + aspect = ASPECT_ANAMORPHIC; + if(this->aspectratio!=aspect) + dxr3_set_property (this_gen, VO_PROP_ASPECT_RATIO, aspect); + } + else{ + /* inform the user that we don't do non-mpeg streams and exit nicely */ + fprintf(stderr,"\nDxr3 videoout plugin doesn't currently play non-mpeg streams\n"); + fprintf(stderr,"Please try xine with -VXv or -VShm for this stream. Exiting...\n"); + exit(1); + } + } static void dxr3_display_frame (vo_driver_t *this_gen, vo_frame_t *frame) |