summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorJames Almer <jamrial@gmail.com>2016-08-01 15:11:05 -0300
committerJames Almer <jamrial@gmail.com>2016-08-01 15:11:05 -0300
commitf41048f6ec5671c2e09ae317cecc1e98ecc3c2ce (patch)
tree6a592b4d93164256410d27cf46e8da427b741bc4 /libavcodec/h264_slice.c
parent12759cc0345cec5a418d8caec5435297d1ec04b2 (diff)
parent5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c (diff)
downloadffmpeg-streaming-f41048f6ec5671c2e09ae317cecc1e98ecc3c2ce.zip
ffmpeg-streaming-f41048f6ec5671c2e09ae317cecc1e98ecc3c2ce.tar.gz
Merge commit '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c'
* commit '5c2fb561d94fc51d76ab21d6f7cc5b6cc3aa599c': h264: add H264_ prefix to the NAL unit types Conflicts: libavcodec/h264_parse.c libavcodec/h264_parser.c libavcodec/h264_slice.c libavcodec/h264dec.c Merged-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 9495b6e..fcc8443 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1542,7 +1542,7 @@ static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,
sl->slice_type = slice_type;
sl->slice_type_nos = slice_type & 3;
- if (nal->type == NAL_IDR_SLICE &&
+ if (nal->type == H264_NAL_IDR_SLICE &&
sl->slice_type_nos != AV_PICTURE_TYPE_I) {
av_log(h->avctx, AV_LOG_ERROR, "A non-intra slice in an IDR NAL unit.\n");
return AVERROR_INVALIDDATA;
@@ -1605,7 +1605,7 @@ static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,
sl->max_pic_num = 1 << (sps->log2_max_frame_num + 1);
}
- if (nal->type == NAL_IDR_SLICE)
+ if (nal->type == H264_NAL_IDR_SLICE)
get_ue_golomb_long(&sl->gb); /* idr_pic_id */
if (sps->poc_type == 0) {
@@ -1758,7 +1758,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl,
h->current_slice = 0;
if (ret < 0)
return ret;
- } else if (h->cur_pic_ptr && !FIELD_PICTURE(h) && !h->first_field && h->nal_unit_type == NAL_IDR_SLICE) {
+ } else if (h->cur_pic_ptr && !FIELD_PICTURE(h) && !h->first_field && h->nal_unit_type == H264_NAL_IDR_SLICE) {
av_log(h, AV_LOG_WARNING, "Broken frame packetizing\n");
ret = ff_h264_field_end(h, h->slice_ctx, 1);
h->current_slice = 0;
@@ -1788,7 +1788,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl,
(h->avctx->skip_frame >= AVDISCARD_NONREF && !h->nal_ref_idc) ||
(h->avctx->skip_frame >= AVDISCARD_BIDIR && sl->slice_type_nos == AV_PICTURE_TYPE_B) ||
(h->avctx->skip_frame >= AVDISCARD_NONINTRA && sl->slice_type_nos != AV_PICTURE_TYPE_I) ||
- (h->avctx->skip_frame >= AVDISCARD_NONKEY && h->nal_unit_type != NAL_IDR_SLICE && h->sei.recovery_point.recovery_frame_cnt < 0) ||
+ (h->avctx->skip_frame >= AVDISCARD_NONKEY && h->nal_unit_type != H264_NAL_IDR_SLICE && h->sei.recovery_point.recovery_frame_cnt < 0) ||
h->avctx->skip_frame >= AVDISCARD_ALL) {
return SLICE_SKIPED;
}
@@ -1861,7 +1861,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl,
if (h->avctx->skip_loop_filter >= AVDISCARD_ALL ||
(h->avctx->skip_loop_filter >= AVDISCARD_NONKEY &&
- h->nal_unit_type != NAL_IDR_SLICE) ||
+ h->nal_unit_type != H264_NAL_IDR_SLICE) ||
(h->avctx->skip_loop_filter >= AVDISCARD_NONINTRA &&
sl->slice_type_nos != AV_PICTURE_TYPE_I) ||
(h->avctx->skip_loop_filter >= AVDISCARD_BIDIR &&
@@ -1938,7 +1938,7 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl,
sl->mb_y * h->mb_width + sl->mb_x,
av_get_picture_type_char(sl->slice_type),
sl->slice_type_fixed ? " fix" : "",
- nal->type == NAL_IDR_SLICE ? " IDR" : "",
+ nal->type == H264_NAL_IDR_SLICE ? " IDR" : "",
h->poc.frame_num,
h->cur_pic_ptr->field_poc[0],
h->cur_pic_ptr->field_poc[1],
OpenPOWER on IntegriCloud