summaryrefslogtreecommitdiff
path: root/src/libvdpau/h264_parser.h
diff options
context:
space:
mode:
authorJulian Scheel <julian@jusst.de>2008-12-09 18:15:34 +0000
committerJulian Scheel <julian@jusst.de>2008-12-09 18:15:34 +0000
commit7a50f9ae0c9f3c5c7c2872810506fbbe74aaa717 (patch)
tree86545341b5e916bb238008f0078af4dfa1f8d51d /src/libvdpau/h264_parser.h
parent4f0ed8bccfeec21407f48a23a87fd7d4b704cd45 (diff)
downloadxine-lib-7a50f9ae0c9f3c5c7c2872810506fbbe74aaa717.tar.gz
xine-lib-7a50f9ae0c9f3c5c7c2872810506fbbe74aaa717.tar.bz2
Fix parsing if a nal header is split across multiple buffers.
Diffstat (limited to 'src/libvdpau/h264_parser.h')
-rw-r--r--src/libvdpau/h264_parser.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/libvdpau/h264_parser.h b/src/libvdpau/h264_parser.h
index bfd6d3b35..3381cf4c2 100644
--- a/src/libvdpau/h264_parser.h
+++ b/src/libvdpau/h264_parser.h
@@ -11,18 +11,26 @@
struct nal_parser {
uint8_t buf[MAX_FRAME_SIZE];
- int buf_len;
- int found_sps;
- int found_pps;
- int last_nal_res;
+ uint32_t buf_len;
+
+ /* prebuf is a ringbuffer */
+ uint8_t prebuf[MAX_FRAME_SIZE];
+ uint32_t prebuf_len;
+ uint32_t next_nal_position;
+ uint8_t incomplete_nal;
+
+ uint8_t found_sps;
+ uint8_t found_pps;
+ uint8_t last_nal_res;
uint8_t is_idr;
int field; /* 0=top, 1=bottom, -1=both */
int slice;
int slice_cnt;
- int have_top;
- int have_frame;
+
+ uint8_t have_top;
+ uint8_t have_frame;
struct nal_unit *nal0;
struct nal_unit *nal1;