diff options
| author | phintuka <phintuka> | 2010-02-16 12:38:43 +0000 |
|---|---|---|
| committer | phintuka <phintuka> | 2010-02-16 12:38:43 +0000 |
| commit | c216879d7213dbc13e6f0993fd2ca3ab51544085 (patch) | |
| tree | ac1c1225bd42b9fb37124c71837c131ee1df80a3 | |
| parent | 0667b17d18c577501d76b045e2271470c1f6f317 (diff) | |
| download | xineliboutput-c216879d7213dbc13e6f0993fd2ca3ab51544085.tar.gz xineliboutput-c216879d7213dbc13e6f0993fd2ca3ab51544085.tar.bz2 | |
Parse video DTS
| -rw-r--r-- | xine/ts2es.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xine/ts2es.c b/xine/ts2es.c index 1f87b3a4..6476ad4d 100644 --- a/xine/ts2es.c +++ b/xine/ts2es.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: ts2es.c,v 1.6 2010-02-15 11:39:31 phintuka Exp $ + * $Id: ts2es.c,v 1.7 2010-02-16 12:38:43 phintuka Exp $ * */ @@ -51,6 +51,13 @@ static void ts2es_parse_pes(ts2es_t *this) if (this->buf->pts <= 0) this->buf->pts = 0; + /* parse DTS */ + if (this->video && this->buf->pts > 0) { + int64_t dts = pes_get_dts(this->buf->content, this->buf->size); + if (dts > 0) + this->buf->decoder_info[0] = this->buf->pts - dts; + } + /* strip PES header */ this->buf->content += hdr_len; this->buf->size -= hdr_len; @@ -166,7 +173,6 @@ buf_element_t *ts2es_put(ts2es_t *this, uint8_t *data, fifo_buffer_t *src_fifo) } this->buf->type = this->xine_buf_type; - this->buf->decoder_info[0] = 1; } /* strip ts header */ |
