summaryrefslogtreecommitdiff
path: root/src/libvdpau/h264_parser.c
diff options
context:
space:
mode:
authorJulian Scheel <julian@jusst.de>2008-12-15 14:05:23 +0000
committerJulian Scheel <julian@jusst.de>2008-12-15 14:05:23 +0000
commit0ea5575f5b9e5eda279a99c7acbbc63d13a88274 (patch)
tree948f4fb9b4382d37d3f6ed3a0c8330a8f45134e3 /src/libvdpau/h264_parser.c
parent3c453ddf665670cbfed6f03bce270835df163df1 (diff)
downloadxine-lib-0ea5575f5b9e5eda279a99c7acbbc63d13a88274.tar.gz
xine-lib-0ea5575f5b9e5eda279a99c7acbbc63d13a88274.tar.bz2
Fix endless loop.
Diffstat (limited to 'src/libvdpau/h264_parser.c')
-rw-r--r--src/libvdpau/h264_parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libvdpau/h264_parser.c b/src/libvdpau/h264_parser.c
index 9be736083..515a1db5e 100644
--- a/src/libvdpau/h264_parser.c
+++ b/src/libvdpau/h264_parser.c
@@ -1132,14 +1132,14 @@ int parse_frame(struct nal_parser *parser, uint8_t *inbuf, int inbuf_len,
* this might happen if the nal start sequence is split
* over the buf-boundary - if this is the case we
*/
- if((next_nal = seek_for_nal(prebuf+3, parser->prebuf_len)) >= 0) {
+ if(parsed_len > 2 &&
+ (next_nal = seek_for_nal(prebuf+3, parser->prebuf_len)) >= 0) {
inbuf -= parser->prebuf_len-next_nal-3;
parsed_len -= parser->prebuf_len-next_nal-3;
parser->prebuf_len = next_nal+3;
}
}
-
*ret_len = 0;
*ret_buf = NULL;
return parsed_len;