summaryrefslogtreecommitdiff
path: root/src/demuxers/demux_mpeg_pes.c
diff options
context:
space:
mode:
authorDarren Salt <linux@youmustbejoking.demon.co.uk>2007-05-08 17:11:27 +0100
committerDarren Salt <linux@youmustbejoking.demon.co.uk>2007-05-08 17:11:27 +0100
commit92d72104e3cd37e7470a41a65b230297592f1331 (patch)
tree5b411206574417f441e169d86f93db2a136dd027 /src/demuxers/demux_mpeg_pes.c
parentefbef33b133ee728285f6bfb5f5014041dc991d4 (diff)
parent213eac661441a9c482f280c5cb5ec63240c8d29e (diff)
downloadxine-lib-92d72104e3cd37e7470a41a65b230297592f1331.tar.gz
xine-lib-92d72104e3cd37e7470a41a65b230297592f1331.tar.bz2
Merge from 1.1.
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);
+ }
}
}