diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-02-15 21:05:31 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-02-15 21:05:31 +0100 |
commit | f3a862935d68f6b8f0b9432c39c5bb42fcf175d0 (patch) | |
tree | c9020555b0e9fab3f4aa077c4c0105f7358fa874 /libavcodec | |
parent | 91126dc481a48400dd00cc45e98fb25520344874 (diff) | |
parent | dc971acf4aa31fb5ffb37aad01e6f1fd8e90a0fa (diff) | |
download | ffmpeg-f3a862935d68f6b8f0b9432c39c5bb42fcf175d0.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
h264_parser: use enum values in h264_find_frame_end()
Conflicts:
libavcodec/h264_parser.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/h264_parser.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libavcodec/h264_parser.c b/libavcodec/h264_parser.c index 3784e22de7..4432871763 100644 --- a/libavcodec/h264_parser.c +++ b/libavcodec/h264_parser.c @@ -76,13 +76,15 @@ static int h264_find_frame_end(H264Context *h, const uint8_t *buf, else state >>= 1; // 2->1, 1->0, 0->0 } else if (state <= 5) { - int v = buf[i] & 0x1F; - if (v == 6 || v == 7 || v == 8 || v == 9) { + int nalu_type = buf[i] & 0x1F; + if (nalu_type == NAL_SEI || nalu_type == NAL_SPS || + nalu_type == NAL_PPS || nalu_type == NAL_AUD) { if (pc->frame_start_found) { i++; goto found; } - } else if (v == 1 || v == 2 || v == 5) { + } else if (nalu_type == NAL_SLICE || nalu_type == NAL_DPA || + nalu_type == NAL_IDR_SLICE) { state += 8; continue; } |