diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_ts.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c index 57925deff..3bea3ef57 100644 --- a/src/demuxers/demux_ts.c +++ b/src/demuxers/demux_ts.c @@ -341,6 +341,8 @@ typedef struct { int32_t npkt_read; uint8_t buf[BUF_SIZE]; /* == PKT_SIZE * NPKT_PER_READ */ + + int numPreview; } demux_ts_t; @@ -895,6 +897,16 @@ static void demux_ts_buffer_pes(demux_ts_t*this, unsigned char *ts, m->buf->decoder_info[1] = BUF_SPECIAL_SPU_DVD_SUBTYPE; m->buf->decoder_info[2] = SPU_DVD_SUBTYPE_PACKAGE; } + else { + if (this->numPreview<5) + ++this->numPreview; + if ( this->numPreview==1 ) + m->buf->decoder_flags=BUF_FLAG_HEADER | BUF_FLAG_FRAME_END; + else if ( this->numPreview<5 ) + m->buf->decoder_flags=BUF_FLAG_PREVIEW; + else + m->buf->decoder_flags=BUF_FLAG_FRAME_END; + } m->buf->pts = m->pts; m->buf->decoder_info[0] = 1; @@ -2260,6 +2272,8 @@ static demux_plugin_t *open_plugin (demux_class_t *class_gen, /* dvb */ this->event_queue = xine_event_new_queue (this->stream); + this->numPreview=0; + return &this->demux_plugin; } |