summaryrefslogtreecommitdiff
path: root/src/input/net_buf_ctrl.c
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2011-10-26 20:06:44 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2011-10-26 20:06:44 +0100
commit4e264feffade0d266f5c624ea2972d6e31f9ba22 (patch)
tree80137268b1dff0d225e0d5f2bc091d49e135c4d5 /src/input/net_buf_ctrl.c
parentb79a6345c075d6d07a45794888136c792c687568 (diff)
parent7991c3891d62ccbcfe8fc9670b03907444e7910d (diff)
downloadxine-lib-4e264feffade0d266f5c624ea2972d6e31f9ba22.tar.gz
xine-lib-4e264feffade0d266f5c624ea2972d6e31f9ba22.tar.bz2
Merge from 1.1.
Diffstat (limited to 'src/input/net_buf_ctrl.c')
-rw-r--r--src/input/net_buf_ctrl.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c
index 81165afcf..d50a6a8c4 100644
--- a/src/input/net_buf_ctrl.c
+++ b/src/input/net_buf_ctrl.c
@@ -186,19 +186,20 @@ static void dvbspeed_put (nbc_t *this, fifo_buffer_t * fifo, buf_element_t *b) {
int used, mode;
const char *name;
/* select vars */
- if (fifo == this->video_fifo) {
+ mode = b->type & BUF_MAJOR_MASK;
+ if (mode == BUF_VIDEO_BASE) {
last = &this->dvbs_video_in;
fill = &this->dvbs_video_fill;
mode = 0x71;
name = "video";
- } else if (fifo == this->audio_fifo) {
+ } else if (mode == BUF_AUDIO_BASE) {
last = &this->dvbs_audio_in;
fill = &this->dvbs_audio_fill;
mode = 0x0f;
name = "audio";
} else return;
/* update fifo fill time */
- if (b->pts && (b->decoder_flags & BUF_FLAG_FRAME_START)) {
+ if (b->pts) {
if (*last) {
diff = b->pts - *last;
if ((diff > -220000) && (diff < 220000)) *fill += diff;
@@ -261,19 +262,20 @@ static void dvbspeed_get (nbc_t *this, fifo_buffer_t * fifo, buf_element_t *b) {
int used, mode;
const char *name;
/* select vars */
- if (fifo == this->video_fifo) {
+ mode = b->type & BUF_MAJOR_MASK;
+ if (mode == BUF_VIDEO_BASE) {
last = &this->dvbs_video_out;
fill = &this->dvbs_video_fill;
mode = 0x71;
name = "video";
- } else if (fifo == this->audio_fifo) {
+ } else if (mode == BUF_AUDIO_BASE) {
last = &this->dvbs_audio_out;
fill = &this->dvbs_audio_fill;
mode = 0x0f;
name = "audio";
} else return;
/* update fifo fill time */
- if (b->pts && (b->decoder_flags & BUF_FLAG_FRAME_START)) {
+ if (b->pts) {
if (*last) {
diff = b->pts - *last;
if ((diff > -220000) && (diff < 220000)) *fill -= diff;