[Mplayer-cvslog] CVS: main mplayer.c,1.117,1.118
GEREOFFY
arpi_esp at users.sourceforge.net
Mon May 14 00:45:23 CEST 2001
Update of /cvsroot/mplayer/main
In directory usw-pr-cvs1:/tmp/cvs-serv16183
Modified Files:
mplayer.c
Log Message:
dump stuff moved before header parsing
Index: mplayer.c
===================================================================
RCS file: /cvsroot/mplayer/main/mplayer.c,v
retrieving revision 1.117
retrieving revision 1.118
diff -C2 -r1.117 -r1.118
*** mplayer.c 2001/05/13 16:29:10 1.117
--- mplayer.c 2001/05/13 22:45:21 1.118
***************
*** 915,918 ****
--- 915,951 ----
} // switch(file_format)
+ // DUMP STREAMS:
+ if(stream_dump_type){
+ FILE *f;
+ int len;
+ demux_stream_t *ds=NULL;
+ // select stream to dump
+ switch(stream_dump_type){
+ case 1: ds=d_audio;break;
+ case 2: ds=d_video;break;
+ case 3: ds=d_dvdsub;break;
+ }
+ if(!ds){
+ printf("dump: FATAL: selected stream missing!\n");
+ exit(1);
+ }
+ // disable other streams:
+ if(d_audio && d_audio!=ds) {ds_free_packs(d_audio); d_audio->id=-2; }
+ if(d_video && d_video!=ds) {ds_free_packs(d_video); d_video->id=-2; }
+ if(d_dvdsub && d_dvdsub!=ds) {ds_free_packs(d_dvdsub); d_dvdsub->id=-2; }
+ // let's dump it!
+ f=fopen(stream_dump_name?stream_dump_name:"stream.dump","wb");
+ if(!f){ printf("Can't open dump file!!!\n");exit(1); }
+ while(!ds->eof){
+ unsigned char* start;
+ int in_size=ds_get_packet(ds,&start);
+ if(in_size>0) fwrite(start,in_size,1,f);
+ }
+ fclose(f);
+ printf("core dumped :)\n");
+ exit(1);
+ }
+
+
// Determine image properties:
switch(file_format){
***************
*** 1011,1045 ****
fflush(stdout);
-
- if(stream_dump_type){
- FILE *f;
- int len;
- demux_stream_t *ds=NULL;
- // select stream to dump
- switch(stream_dump_type){
- case 1: ds=d_audio;break;
- case 2: ds=d_video;break;
- case 3: ds=d_dvdsub;break;
- }
- if(!ds){
- printf("dump: FATAL: selected stream missing!\n");
- exit(1);
- }
- // disable other streams:
- if(d_audio && d_audio!=ds) {ds_free_packs(d_audio); d_audio->id=-2; }
- if(d_video && d_video!=ds) {ds_free_packs(d_video); d_video->id=-2; }
- if(d_dvdsub && d_dvdsub!=ds) {ds_free_packs(d_dvdsub); d_dvdsub->id=-2; }
- // let's dump it!
- f=fopen(stream_dump_name?stream_dump_name:"stream.dump","wb");
- if(!f){ printf("Can't open dump file!!!\n");exit(1); }
- while(!ds->eof){
- unsigned char* start;
- int in_size=ds_get_packet(ds,&start);
- if(in_size>0) fwrite(start,in_size,1,f);
- }
- fclose(f);
- printf("core dumped :)\n");
- exit(1);
- }
if(!sh_video){
--- 1044,1047 ----
_______________________________________________
Mplayer-cvslog mailing list
Mplayer-cvslog at lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/mplayer-cvslog
More information about the MPlayer-cvslog
mailing list