changeset 7142:ea3f7a306873

can't dump stream if it isn't stream - tip by Ross Finlayson <finlayson@live.com>
author arpi
date Thu, 29 Aug 2002 20:11:43 +0000
parents 8a46f9572b8b
children fdfc10c2e2d2
files mplayer.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mplayer.c	Thu Aug 29 19:12:36 2002 +0000
+++ b/mplayer.c	Thu Aug 29 20:11:43 2002 +0000
@@ -1001,6 +1001,10 @@
   int len;
   FILE *f;
   current_module="dumpstream";
+  if(stream->fd<0){
+    mp_msg(MSGT_CPLAYER,MSGL_FATAL,"Cannot dump this stream - no 'fd' available\n");
+    exit_player(MSGTR_Exit_error);
+  }
   stream_reset(stream);
   stream_seek(stream,stream->start_pos);
   f=fopen(stream_dump_name,"wb");