diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libvdpau/nal_parser.c | 6 | ||||
-rw-r--r-- | src/libvdpau/vdpau_h264.c | 15 |
2 files changed, 18 insertions, 3 deletions
diff --git a/src/libvdpau/nal_parser.c b/src/libvdpau/nal_parser.c index 314170380..be765d408 100644 --- a/src/libvdpau/nal_parser.c +++ b/src/libvdpau/nal_parser.c @@ -869,8 +869,8 @@ int parse_frame(struct nal_parser *parser, uint8_t *inbuf, int inbuf_len, } if(parser->last_nal_res != 2) { - /* this is a nal_unit != SLICE, cut this out */ - xine_fast_memcpy(&parser->buf[parser->buf_len], inbuf, next_nal+search_offset); + /* this is not nal_unit != SLICE, keep it in the buffer */ + xine_fast_memcpy(parser->buf + parser->buf_len, inbuf, next_nal+search_offset); parser->buf_len += next_nal+search_offset; } @@ -889,7 +889,7 @@ int parse_frame(struct nal_parser *parser, uint8_t *inbuf, int inbuf_len, //memset(parser->buf, 0x00, parser->buf_len); parser->buf_len = 0; - parser->last_nal_res = 0; + parser->last_nal_res = 1; parser->slice_cnt = 0; /*if(parser->current_nal->nal_ref_idc) { diff --git a/src/libvdpau/vdpau_h264.c b/src/libvdpau/vdpau_h264.c index 699c9108c..2e88932d4 100644 --- a/src/libvdpau/vdpau_h264.c +++ b/src/libvdpau/vdpau_h264.c @@ -285,6 +285,21 @@ static void vdpau_h264_decode_data (video_decoder_t *this_gen, //dump_pictureinfo_h264(&pic); + int i; + printf("Decode data: \n"); + for(i = 0; i < ((vdp_buffer.bitstream_bytes < 20) ? vdp_buffer.bitstream_bytes : 20); i++) { + printf("%02x ", ((uint8_t*)vdp_buffer.bitstream)[i]); + if((i+1) % 10 == 0) + printf("\n"); + } + printf("\n...\n"); + for(i = vdp_buffer.bitstream_bytes - 20; i < vdp_buffer.bitstream_bytes; i++) { + printf("%02x ", ((uint8_t*)vdp_buffer.bitstream)[i]); + if((i+1) % 10 == 0) + printf("\n"); + } + + if(img == NULL) { img = this->stream->video_out->get_frame (this->stream->video_out, this->width, this->height, |