aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2018-03-11 17:04:01 +0000
committerMark Thompson <sw@jkqxz.net>2018-03-18 17:55:00 +0000
commit94d42cb4cc6e420c80abbf54148be1578f7c3244 (patch)
treed6873bf759b3887e6eaa51cefd06e4917cca7f4d
parent84c3c766d86d1e064b77f9c56e4930e936bc84ec (diff)
downloadffmpeg-94d42cb4cc6e420c80abbf54148be1578f7c3244.tar.gz
h264_metadata: Remove unused fields
The SEI NAL is unused since 69062d0f9b6aef5d9d9b8c9c9b5cfb23037caddb, while the AUD NAL is small and would more sensibly be on the stack.
-rw-r--r--libavcodec/h264_metadata_bsf.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/libavcodec/h264_metadata_bsf.c b/libavcodec/h264_metadata_bsf.c
index 36047887ca..da37115b5d 100644
--- a/libavcodec/h264_metadata_bsf.c
+++ b/libavcodec/h264_metadata_bsf.c
@@ -47,9 +47,6 @@ typedef struct H264MetadataContext {
int done_first_au;
- H264RawAUD aud_nal;
- H264RawSEI sei_nal;
-
int aud;
AVRational sample_aspect_ratio;
@@ -259,7 +256,9 @@ static int h264_metadata_filter(AVBSFContext *bsf, AVPacket *out)
0x3ff, // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
};
int primary_pic_type_mask = 0xff;
- H264RawAUD *aud = &ctx->aud_nal;
+ H264RawAUD aud = {
+ .nal_unit_header.nal_unit_type = H264_NAL_AUD,
+ };
for (i = 0; i < au->nb_units; i++) {
if (au->units[i].type == H264_NAL_SLICE ||
@@ -282,11 +281,10 @@ static int h264_metadata_filter(AVBSFContext *bsf, AVPacket *out)
goto fail;
}
- aud->nal_unit_header.nal_unit_type = H264_NAL_AUD;
- aud->primary_pic_type = j;
+ aud.primary_pic_type = j;
err = ff_cbs_insert_unit_content(ctx->cbc, au,
- 0, H264_NAL_AUD, aud, NULL);
+ 0, H264_NAL_AUD, &aud, NULL);
if (err < 0) {
av_log(bsf, AV_LOG_ERROR, "Failed to insert AUD.\n");
goto fail;