summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_mpeg_pes.c
diff options
context:
space:
mode:
authorMatt Messier <mmessier@grapetv.org>2007-05-08 15:10:27 -0400
committerMatt Messier <mmessier@grapetv.org>2007-05-08 15:10:27 -0400
commitc8f3f69be6bd2a6ce361e2433f174abd57b77911 (patch)
treea8db2fb70963d1e4e2a4c8291a9a5548540ca7eb /src/demuxers/demux_mpeg_pes.c
parent1956c347edc0af71e479eacbc9e64f67ba7cba05 (diff)
parent92d72104e3cd37e7470a41a65b230297592f1331 (diff)
downloadxine-lib-c8f3f69be6bd2a6ce361e2433f174abd57b77911.tar.gz
xine-lib-c8f3f69be6bd2a6ce361e2433f174abd57b77911.tar.bz2
Merge changes from main 1.2 repository
Diffstat (limited to 'src/demuxers/demux_mpeg_pes.c')
-rw-r--r--src/demuxers/demux_mpeg_pes.c25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/demuxers/demux_mpeg_pes.c b/src/demuxers/demux_mpeg_pes.c
index c5769e3e3..fbfde4e60 100644
--- a/src/demuxers/demux_mpeg_pes.c
+++ b/src/demuxers/demux_mpeg_pes.c
@@ -1135,17 +1135,20 @@ static int32_t parse_video_stream(demux_mpeg_pes_t *this, uint8_t *p, buf_elemen
*/
if (this->mpeg12_h264_detected & 1) {
buf_type = BUF_VIDEO_H264;
- int nal_type_code = -1;
- if (payload_size >= 4 && p[2] == 0x01 && p[1] == 0x00 && p[0] == 0x00)
- nal_type_code = p[3] & 0x1f;
- if (nal_type_code == 9) { /* access unit delimiter */
- buf_element_t *b = this->video_fifo->buffer_pool_alloc (this->video_fifo);
- b->content = b->mem;
- b->size = 0;
- b->pts = 0;
- b->type = buf_type;
- b->decoder_flags = BUF_FLAG_FRAME_END;
- this->video_fifo->put (this->video_fifo, b);
+ /* omit sending BUF_FLAG_FRAME_END for the first AUD occurence */
+ if (this->mpeg12_h264_detected > 2) {
+ int nal_type_code = -1;
+ if (payload_size >= 4 && p[2] == 0x01 && p[1] == 0x00 && p[0] == 0x00)
+ nal_type_code = p[3] & 0x1f;
+ if (nal_type_code == 9) { /* access unit delimiter */
+ buf_element_t *b = this->video_fifo->buffer_pool_alloc (this->video_fifo);
+ b->content = b->mem;
+ b->size = 0;
+ b->pts = 0;
+ b->type = buf_type;
+ b->decoder_flags = BUF_FLAG_FRAME_END;
+ this->video_fifo->put (this->video_fifo, b);
+ }
}
}