summaryrefslogtreecommitdiffstats
path: root/libavcodec/h264_mp4toannexb_bsf.c
diff options
context:
space:
mode:
authorBenoit Fouet <benoit.fouet@free.fr>2014-08-01 15:31:30 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-08-01 17:58:30 +0200
commitf9bd6d61bcc158b2fa36089771c042fa1f074e9c (patch)
tree2dd772a5a9c04ba9192872de078b6533e3c2f1c5 /libavcodec/h264_mp4toannexb_bsf.c
parent293124cae80e7ea8ad4d95539ff605fb12aa9516 (diff)
downloadffmpeg-streaming-f9bd6d61bcc158b2fa36089771c042fa1f074e9c.zip
ffmpeg-streaming-f9bd6d61bcc158b2fa36089771c042fa1f074e9c.tar.gz
h264_mp4toannexb_bsf: rename first_idr to new_idr
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_mp4toannexb_bsf.c')
-rw-r--r--libavcodec/h264_mp4toannexb_bsf.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/h264_mp4toannexb_bsf.c b/libavcodec/h264_mp4toannexb_bsf.c
index e0c1385..739ff95 100644
--- a/libavcodec/h264_mp4toannexb_bsf.c
+++ b/libavcodec/h264_mp4toannexb_bsf.c
@@ -27,7 +27,7 @@
typedef struct H264BSFContext {
uint8_t length_size;
- uint8_t first_idr;
+ uint8_t new_idr;
uint8_t idr_sps_pps_seen;
int extradata_parsed;
} H264BSFContext;
@@ -155,7 +155,7 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
if (ret < 0)
return ret;
ctx->length_size = ret;
- ctx->first_idr = 1;
+ ctx->new_idr = 1;
ctx->idr_sps_pps_seen = 0;
ctx->extradata_parsed = 1;
}
@@ -182,22 +182,22 @@ static int h264_mp4toannexb_filter(AVBitStreamFilterContext *bsfc,
/* if this is a new IDR picture following an IDR picture, reset the idr flag.
* Just check first_mb_in_slice to be 0 as this is the simplest solution.
* This could be checking idr_pic_id instead, but would complexify the parsing. */
- if (!ctx->first_idr && unit_type == 5 && (buf[1] & 0x80))
- ctx->first_idr = 1;
+ if (!ctx->new_idr && unit_type == 5 && (buf[1] & 0x80))
+ ctx->new_idr = 1;
/* prepend only to the first type 5 NAL unit of an IDR picture, if no sps/pps are already present */
- if (ctx->first_idr && unit_type == 5 && !ctx->idr_sps_pps_seen) {
+ if (ctx->new_idr && unit_type == 5 && !ctx->idr_sps_pps_seen) {
if ((ret=alloc_and_copy(poutbuf, poutbuf_size,
avctx->extradata, avctx->extradata_size,
buf, nal_size)) < 0)
goto fail;
- ctx->first_idr = 0;
+ ctx->new_idr = 0;
} else {
if ((ret=alloc_and_copy(poutbuf, poutbuf_size,
NULL, 0, buf, nal_size)) < 0)
goto fail;
- if (!ctx->first_idr && unit_type == 1) {
- ctx->first_idr = 1;
+ if (!ctx->new_idr && unit_type == 1) {
+ ctx->new_idr = 1;
ctx->idr_sps_pps_seen = 0;
}
}
OpenPOWER on IntegriCloud