diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-12-05 18:52:29 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-12-08 00:42:48 +0100 |
commit | e38eaf47491a864b2180d1ade87ed0ef39dd6d34 (patch) | |
tree | eaf47cc5cd738a86e4e0f05f4657c7ea7114dbca /libavformat/sdp.c | |
parent | b09ea67b40e342f5e4183e9ebc0c14801ecd218c (diff) | |
download | ffmpeg-e38eaf47491a864b2180d1ade87ed0ef39dd6d34.tar.gz |
avformat/utils: Make ff_data_to_hex() zero-terminate the string
Most callers want it that way anyway.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavformat/sdp.c')
-rw-r--r-- | libavformat/sdp.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/libavformat/sdp.c b/libavformat/sdp.c index a41c2cf655..e83616cfbe 100644 --- a/libavformat/sdp.c +++ b/libavformat/sdp.c @@ -216,7 +216,6 @@ static char *extradata2psets(AVFormatContext *s, AVCodecParameters *par) memcpy(p, profile_string, strlen(profile_string)); p += strlen(p); ff_data_to_hex(p, sps + 1, 3, 0); - p[6] = '\0'; } av_free(tmpbuf); @@ -340,7 +339,6 @@ static char *extradata2config(AVFormatContext *s, AVCodecParameters *par) } memcpy(config, "; config=", 9); ff_data_to_hex(config + 9, par->extradata, par->extradata_size, 0); - config[9 + par->extradata_size * 2] = 0; return config; } @@ -475,7 +473,6 @@ static char *latm_context2config(AVFormatContext *s, AVCodecParameters *par) return NULL; } ff_data_to_hex(config, config_byte, 6, 1); - config[12] = 0; return config; } |