summaryrefslogtreecommitdiff
path: root/libavcodec/h264_parser.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-03 03:31:24 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2011-12-03 03:34:23 +0100
commit2d6a45c12a9151aa8c3407cd2981a160c71db708 (patch)
treebbfe6b97b7b930a01d9e7cdcad8340d57a2582a1 /libavcodec/h264_parser.c
parent215b7724e7ef332eab5aff8d1ab6b77a11f47c4f (diff)
downloadffmpeg-2d6a45c12a9151aa8c3407cd2981a160c71db708.tar.gz
Silence warnings when decoding QNAP Systems H264 codec.
Fixes ticket #571.
Diffstat (limited to 'libavcodec/h264_parser.c')
-rw-r--r--libavcodec/h264_parser.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c
index 0b8798dbed..ee766a1f27 100644
--- a/libavcodec/h264_parser.c
+++ b/libavcodec/h264_parser.c
@@ -148,6 +148,7 @@ static inline int parse_nal_units(AVCodecParserContext *s,
unsigned int slice_type;
int state = -1;
const uint8_t *ptr;
+ int q264 = buf_size >=4 && !memcmp("Q264", buf, 4);
/* set some sane default values */
s->pict_type = AV_PICTURE_TYPE_I;
@@ -266,6 +267,8 @@ static inline int parse_nal_units(AVCodecParserContext *s,
}
buf += consumed;
}
+ if (q264)
+ return 0;
/* didn't find a picture! */
av_log(h->s.avctx, AV_LOG_ERROR, "missing picture in access unit with size %d\n", buf_size);
return -1;