diff options
author | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 03:05:39 +0200 |
---|---|---|
committer | Uoti Urpala <uau@glyph.nonexistent.invalid> | 2010-11-02 04:18:38 +0200 |
commit | 2be10f22b24712b959fa2883a4dcfa7caf72ab79 (patch) | |
tree | 964202918d699144b86b181ec7f40d498603383d /mplayer.c | |
parent | 4aa55a7725647357cf8a6b15f9283cc9c1a4fd86 (diff) | |
download | mpv-2be10f22b24712b959fa2883a4dcfa7caf72ab79.tar.bz2 mpv-2be10f22b24712b959fa2883a4dcfa7caf72ab79.tar.xz |
options: move -dumpfile to option struct
Diffstat (limited to 'mplayer.c')
-rw-r--r-- | mplayer.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -325,7 +325,6 @@ float stream_cache_seek_min_percent=50.0; #endif // dump: -static char *stream_dump_name="stream.dump"; int stream_dump_type=0; // A-V sync: @@ -3653,7 +3652,7 @@ if(stream_dump_type==5){ current_module="dumpstream"; stream_reset(mpctx->stream); stream_seek(mpctx->stream,mpctx->stream->start_pos); - f=fopen(stream_dump_name,"wb"); + f=fopen(opts->stream_dump_name,"wb"); if(!f){ mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,"Cannot open dump file.\n"); exit_player(mpctx, EXIT_ERROR); @@ -3666,7 +3665,7 @@ if(stream_dump_type==5){ len=stream_read(mpctx->stream,buf,4096); if(len>0) { if(fwrite(buf,len,1,f) != 1) { - mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"%s: Error writing file.\n",stream_dump_name); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"%s: Error writing file.\n",opts->stream_dump_name); exit_player(mpctx, EXIT_ERROR); } } @@ -3679,7 +3678,7 @@ if(stream_dump_type==5){ } } if(fclose(f)) { - mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"%s: Error writing file.\n",stream_dump_name); + mp_tmsg(MSGT_MENCODER,MSGL_FATAL,"%s: Error writing file.\n",opts->stream_dump_name); exit_player(mpctx, EXIT_ERROR); } mp_tmsg(MSGT_CPLAYER,MSGL_INFO,"Core dumped ;)\n"); @@ -3854,7 +3853,7 @@ if((stream_dump_type)&&(stream_dump_type<4)){ if(mpctx->d_video && mpctx->d_video!=ds) {ds_free_packs(mpctx->d_video); mpctx->d_video->id=-2; } if(mpctx->d_sub && mpctx->d_sub!=ds) {ds_free_packs(mpctx->d_sub); mpctx->d_sub->id=-2; } // let's dump it! - f=fopen(stream_dump_name,"wb"); + f=fopen(opts->stream_dump_name,"wb"); if(!f){ mp_tmsg(MSGT_CPLAYER,MSGL_FATAL,"Cannot open dump file.\n"); exit_player(mpctx, EXIT_ERROR); |