summaryrefslogtreecommitdiffstats
path: root/libmpdemux/mf.c
diff options
context:
space:
mode:
authoratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-26 05:25:15 +0000
committeratmos4 <atmos4@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-03-26 05:25:15 +0000
commit14639c9f421ca49aa7a383d88e5d04d4e3b6ffa1 (patch)
tree60ffa9ce9e302d30400458da227636ea776ed627 /libmpdemux/mf.c
parent3f5ad4c82b639b3524df447c08be7685d2ca290a (diff)
downloadmpv-14639c9f421ca49aa7a383d88e5d04d4e3b6ffa1.tar.bz2
mpv-14639c9f421ca49aa7a383d88e5d04d4e3b6ffa1.tar.xz
Fileslist support for mf demuxer, delemited by ',' and change mf fps to float.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@5353 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libmpdemux/mf.c')
-rw-r--r--libmpdemux/mf.c29
1 files changed, 27 insertions, 2 deletions
diff --git a/libmpdemux/mf.c b/libmpdemux/mf.c
index 0d2d0d8744..6ba383779d 100644
--- a/libmpdemux/mf.c
+++ b/libmpdemux/mf.c
@@ -21,7 +21,7 @@
int mf_support = 0;
int mf_w = 352;
int mf_h = 288;
-int mf_fps = 25;
+float mf_fps = 25.0;
char * mf_type = "jpg";
int stream_open_mf(char * filename,stream_t * stream)
@@ -34,8 +34,33 @@ int stream_open_mf(char * filename,stream_t * stream)
int error_count = 0;
int count = 0;
- fname=malloc( strlen( filename ) + 32 );
mf=calloc( 1,sizeof( mf_t ) );
+
+ if( strchr( filename,',') )
+ {
+ fname=malloc( 255 );
+ mp_msg( MSGT_STREAM,MSGL_INFO,"[mf] filelist: %s\n",filename );
+
+ while ( ( fname=strsep( &filename,"," ) ) )
+ {
+ if ( stat( fname,&fs ) )
+ {
+ mp_msg( MSGT_STREAM,MSGL_V,"[mf] file not found: '%s'\n",fname );
+ }
+ else
+ {
+ mf->names=realloc( mf->names,( mf->nr_of_files + 1 ) * sizeof( char* ) );
+ mf->names[mf->nr_of_files]=strdup( fname );
+// mp_msg( MSGT_STREAM,MSGL_V,"[mf] added file %d.: %s\n",mf->nr_of_files,mf->names[mf->nr_of_files] );
+ mf->nr_of_files++;
+ }
+ }
+ goto exit_mf;
+ }
+
+ fname=malloc( strlen( filename ) + 32 );
+
+ mp_msg( MSGT_STREAM,MSGL_INFO,"[mf] number of files: %d\n",mf->nr_of_files );
if ( !strchr( filename,'%' ) )
{