summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/libvdpau/h264_parser.c7
-rw-r--r--src/libvdpau/vdpau_h264.c2
2 files changed, 5 insertions, 4 deletions
diff --git a/src/libvdpau/h264_parser.c b/src/libvdpau/h264_parser.c
index c5af54077..951195caf 100644
--- a/src/libvdpau/h264_parser.c
+++ b/src/libvdpau/h264_parser.c
@@ -1339,7 +1339,7 @@ int parse_frame(struct nal_parser *parser, uint8_t *inbuf, int inbuf_len,
if(parser->nal_size_length > 0) {
static const uint8_t start_seq[3] = { 0x00, 0x00, 0x01 };
- xine_fast_memcpy(parser->buf, start_seq, 3);
+ xine_fast_memcpy(parser->buf+parser->buf_len, start_seq, 3);
parser->buf_len += 3;
}
@@ -1537,8 +1537,9 @@ int seek_for_nal(uint8_t *buf, int buf_len, struct nal_parser *parser)
return next_nal;
}
- /* NAL_END_OF_SEQUENCE */
- if(buf[0] == 0x0a)
+ /* NAL_END_OF_SEQUENCE has only 1 byte, so
+ * we do not need to search for the next start sequence */
+ if(buf[0] == NAL_END_OF_SEQUENCE)
return 1;
int i;
diff --git a/src/libvdpau/vdpau_h264.c b/src/libvdpau/vdpau_h264.c
index 82a18af64..40ae04059 100644
--- a/src/libvdpau/vdpau_h264.c
+++ b/src/libvdpau/vdpau_h264.c
@@ -460,7 +460,7 @@ static int vdpau_decoder_render(video_decoder_t *this_gen, VdpBitstreamBuffer *v
VdpVideoSurface surface = this->vdpau_accel->surface;
- //printf("Decode: NUM: %d, REF: %d, BYTES: %d, PTS: %lld\n", pic.frame_num, pic.is_reference, vdp_buffer.bitstream_bytes, this->curr_pts);
+ //printf("Decode: NUM: %d, REF: %d, BYTES: %d, PTS: %lld\n", pic.frame_num, pic.is_reference, vdp_buffer->bitstream_bytes, this->curr_pts);
VdpStatus status = this->vdpau_accel->vdp_decoder_render(this->decoder,
surface, (VdpPictureInfo*)&pic, 1, vdp_buffer);