diff options
author | Alex Woods <devnull@localhost> | 2004-01-08 16:47:30 +0000 |
---|---|---|
committer | Alex Woods <devnull@localhost> | 2004-01-08 16:47:30 +0000 |
commit | 008ae5b6596a515cacdc283b846ca23bcc1edfc9 (patch) | |
tree | e5bfbe9510c9980ae610e89fcda8a7e38e8f0d6d /linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c | |
parent | a5a25009a36bcd196d7cf698a27fcd582258271d (diff) | |
download | mediapointer-dvb-s2-008ae5b6596a515cacdc283b846ca23bcc1edfc9.tar.gz mediapointer-dvb-s2-008ae5b6596a515cacdc283b846ca23bcc1edfc9.tar.bz2 |
Fix panic that occurs when filters are used at the same time as video
streaming.
Diffstat (limited to 'linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c')
-rw-r--r-- | linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c index 75b9f3c10..5c0e469c5 100644 --- a/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/linux/drivers/media/dvb/ttusb-dec/ttusb_dec.c @@ -125,6 +125,7 @@ struct ttusb_dec { struct tasklet_struct urb_tasklet; spinlock_t urb_frame_list_lock; + struct dvb_demux_filter *av_filter; struct list_head filter_info_list; spinlock_t filter_info_list_lock; @@ -285,9 +286,10 @@ static int ttusb_dec_get_stb_state (struct ttusb_dec *dec, unsigned int *mode, static int ttusb_dec_av_pes2ts_cb(void *priv, unsigned char *data) { - struct dvb_demux_feed *dvbdmxfeed = (struct dvb_demux_feed *)priv; + struct ttusb_dec *dec = (struct ttusb_dec *)priv; - dvbdmxfeed->cb.ts(data, 188, 0, 0, &dvbdmxfeed->feed.ts, DMX_OK); + dec->av_filter->feed->cb.ts(data, 188, 0, 0, + &dec->av_filter->feed->feed.ts, DMX_OK); return 0; } @@ -311,9 +313,9 @@ static void ttusb_dec_set_pids(struct ttusb_dec *dec) ttusb_dec_send_command(dec, 0x50, sizeof(b), b, NULL, NULL); dvb_filter_pes2ts_init(&dec->a_pes2ts, dec->pid[DMX_PES_AUDIO], - ttusb_dec_av_pes2ts_cb, dec->demux.feed); + ttusb_dec_av_pes2ts_cb, dec); dvb_filter_pes2ts_init(&dec->v_pes2ts, dec->pid[DMX_PES_VIDEO], - ttusb_dec_av_pes2ts_cb, dec->demux.feed); + ttusb_dec_av_pes2ts_cb, dec); dec->v_pes_length = 0; dec->v_pes_postbytes = 0; } @@ -805,6 +807,8 @@ static int ttusb_dec_start_ts_feed(struct dvb_demux_feed *dvbdmxfeed) dprintk("\n"); + dec->av_filter = dvbdmxfeed->filter; + switch (dvbdmxfeed->pes_type) { case DMX_TS_PES_VIDEO: @@ -1224,7 +1228,8 @@ static int ttusb_dec_init_dvb(struct ttusb_dec *dec) dprintk("%s\n", __FUNCTION__); - if ((result = dvb_register_adapter(&dec->adapter, dec->model_name)) < 0) { + if ((result = dvb_register_adapter(&dec->adapter, + dec->model_name)) < 0) { printk("%s: dvb_register_adapter failed: error %d\n", __FUNCTION__, result); |