summaryrefslogtreecommitdiff
path: root/src/input/net_buf_ctrl.c
diff options
context:
space:
mode:
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;