summaryrefslogtreecommitdiffstats
path: root/stream/tv.c
diff options
context:
space:
mode:
authordiego <diego@b3059339-0415-0410-9bf9-f77b7e298cf2>2010-09-13 18:09:29 +0000
committerUoti Urpala <uau@glyph.nonexistent.invalid>2010-11-02 04:16:55 +0200
commit8939645dcf39c398e1b70b851b3410299ca619ce (patch)
tree93cada7048d2601ed709c5a79dadd5c7b8add892 /stream/tv.c
parentd65c47dfd0125db8ddbc97d1d929f0157ea8dd47 (diff)
downloadmpv-8939645dcf39c398e1b70b851b3410299ca619ce.tar.bz2
mpv-8939645dcf39c398e1b70b851b3410299ca619ce.tar.xz
stream/tv: move new_handle() function from header to tv.c
Move TV input new_handle static function to tv.c and make it non-static. There is no need to duplicate the function in the binary. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32225 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'stream/tv.c')
-rw-r--r--stream/tv.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/stream/tv.c b/stream/tv.c
index 76f4850999..daa6b7dd7f 100644
--- a/stream/tv.c
+++ b/stream/tv.c
@@ -80,6 +80,31 @@ static const tvi_info_t* tvi_driver_list[]={
NULL
};
+tvi_handle_t *tv_new_handle(int size, const tvi_functions_t *functions)
+{
+ tvi_handle_t *h = malloc(sizeof(*h));
+
+ if (!h)
+ return NULL;
+
+ h->priv = calloc(1, size);
+
+ if (!h->priv) {
+ free(h);
+ return NULL;
+ }
+
+ h->functions = functions;
+ h->seq = 0;
+ h->chanlist = -1;
+ h->chanlist_s = NULL;
+ h->norm = -1;
+ h->channel = -1;
+ h->scan = NULL;
+
+ return h;
+}
+
void tv_free_handle(tvi_handle_t *h)
{
if (h) {