diff options
author | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-07-29 10:18:38 +0000 |
---|---|---|
committer | voroshil <voroshil@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-07-29 10:18:38 +0000 |
commit | 7cdc5ad4fe61b7fd8cc6648256ab952409fd6846 (patch) | |
tree | 1fd3222bfd5b1252c3daadd2bd34f6f4283e7f98 /stream/tv.c | |
parent | b7adae655fe83b1b6609ba1f699b6e61c9a7bf12 (diff) | |
download | mpv-7cdc5ad4fe61b7fd8cc6648256ab952409fd6846.tar.bz2 mpv-7cdc5ad4fe61b7fd8cc6648256ab952409fd6846.tar.xz |
Removing global variables from tv://
Step 2: fixing tv subdrivers initialization.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23903 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/tv.c')
-rw-r--r-- | stream/tv.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/stream/tv.c b/stream/tv.c index 7258d7ff19..9605921151 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -505,11 +505,11 @@ done: return 1; } -static tvi_handle_t *tv_begin(void) +static tvi_handle_t *tv_begin(tv_param_t* tv_param) { int i; tvi_handle_t* h; - if(!strcmp(tv_param_driver,"help")){ + if(!strcmp(tv_param->driver,"help")){ mp_msg(MSGT_TV,MSGL_INFO,MSGTR_TV_AvailableDrivers); for(i=0;tvi_driver_list[i];i++){ mp_msg(MSGT_TV,MSGL_INFO," %s\t%s",tvi_driver_list[i]->short_name,tvi_driver_list[i]->name); @@ -521,10 +521,11 @@ static tvi_handle_t *tv_begin(void) } for(i=0;tvi_driver_list[i];i++){ - if (!strcmp(tvi_driver_list[i]->short_name, tv_param_driver)){ - h=tvi_driver_list[i]->tvi_init(tv_param_device,tv_param_adevice); + if (!strcmp(tvi_driver_list[i]->short_name, tv_param->driver)){ + h=tvi_driver_list[i]->tvi_init(tv_param); if(!h) return NULL; + h->tv_param=tv_param; mp_msg(MSGT_TV, MSGL_INFO, MSGTR_TV_DriverInfo, tvi_driver_list[i]->short_name, tvi_driver_list[i]->name, tvi_driver_list[i]->author, @@ -533,7 +534,7 @@ static tvi_handle_t *tv_begin(void) } } - mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_NoSuchDriver, tv_param_driver); + mp_msg(MSGT_TV, MSGL_ERR, MSGTR_TV_NoSuchDriver, tv_param->driver); return(NULL); } @@ -555,7 +556,7 @@ static demuxer_t* demux_open_tv(demuxer_t *demuxer) tvi_functions_t *funcs; demuxer->priv=NULL; - if(!(tvh=tv_begin())) return NULL; + if(!(tvh=tv_begin(demuxer->stream->priv))) return NULL; if (!tvh->functions->init(tvh->priv)) return NULL; if (!open_tv(tvh)){ tv_uninit(tvh); |