summaryrefslogtreecommitdiff
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2011-12-19 03:00:36 +0100
committerJanne Grunau <janne-libav@jannau.net>2011-12-19 03:24:32 +0100
commit358ea75e9ed7d86c58f6e7faf175faac68e140e9 (patch)
treee5f9bccaa1e9f1670daadde809483939e7ea0ae0 /libavcodec/h264.c
parent7b3894bee9c9b970ff0b9eec9645c466e20e38a1 (diff)
Revert "h264: skip start code search if the size of the nal unit is known"
This reverts commit 87eebb3454ff0cd6af6ebf9e1d31bdfd1c3b601b.
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 5d4ce90cae..77acd7168f 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -137,10 +137,7 @@ int ff_h264_check_intra_pred_mode(H264Context *h, int mode){
return mode;
}
-const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src,
- int *dst_length, int *consumed, int length,
- int nalsize_known)
-{
+const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, int *dst_length, int *consumed, int length){
int i, si, di;
uint8_t *dst;
int bufidx;
@@ -151,9 +148,6 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src,
src++; length--;
- if (nalsize_known) {
- i = length;
- } else
#if HAVE_FAST_UNALIGNED
# if HAVE_FAST_64BIT
# define RS 7
@@ -3795,8 +3789,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
hx = h->thread_context[context_count];
- ptr= ff_h264_decode_nal(hx, buf + buf_index, &dst_length, &consumed,
- next_avc - buf_index, !!nalsize);
+ ptr= ff_h264_decode_nal(hx, buf + buf_index, &dst_length, &consumed, next_avc - buf_index);
if (ptr==NULL || dst_length < 0){
return -1;
}