summaryrefslogtreecommitdiff
path: root/src/input/net_buf_ctrl.c
diff options
context:
space:
mode:
authorPetri Hintukainen <phintuka@users.sourceforge.net>2011-10-18 11:40:01 +0300
committerPetri Hintukainen <phintuka@users.sourceforge.net>2011-10-18 11:40:01 +0300
commit29f7af688b53a81ba1a96c31757b86fde699e679 (patch)
tree01bf70ec660e29c0575dd72855cec0001812f896 /src/input/net_buf_ctrl.c
parentb79a6345c075d6d07a45794888136c792c687568 (diff)
parent5c160b93ade6a07e3bcc084f4552dcd1eb70b5b4 (diff)
downloadxine-lib-29f7af688b53a81ba1a96c31757b86fde699e679.tar.gz
xine-lib-29f7af688b53a81ba1a96c31757b86fde699e679.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;