Re: [FFmpeg-devel] [PATCH]lavf/sdp: Change configuration pointer from char* to uint8_t*.
2019-03-16 0:11 GMT+01:00, Michael Niedermayer : > On Fri, Mar 15, 2019 at 12:56:05AM +0100, Carl Eugen Hoyos wrote: >> Hi! >> >> Attached patch silences three warnings with clang and makes the >> pointer type equal to what the function called with the pointer >> expects. >> >> Please comment, Carl Eugen > >> sdp.c |3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> 9f10029889140041ba33ed19e96c3a296f2edf85 >> 0001-lavf-sdp-Change-pointer-to-configuration-from-char-t.patch >> From cf06b8cc09acd676ac6fb713168c23342d26e1b8 Mon Sep 17 00:00:00 2001 >> From: Carl Eugen Hoyos >> Date: Fri, 15 Mar 2019 00:52:50 +0100 >> Subject: [PATCH] lavf/sdp: Change pointer to configuration from char* to >> uint8_t*. >> >> This is also what av_base64_encode() expects. >> Fixes the following warnings with clang: >> libavformat/sdp.c:394:40: warning: implicit conversion from 'int' to >> 'char' changes value from 254 to -2 >> libavformat/sdp.c:395:40: warning: implicit conversion from 'int' to >> 'char' changes value from 205 to -51 >> libavformat/sdp.c:396:40: warning: implicit conversion from 'int' to >> 'char' changes value from 186 to -70 >> --- >> libavformat/sdp.c |3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/libavformat/sdp.c b/libavformat/sdp.c >> index a5d202e..34e9839 100644 >> --- a/libavformat/sdp.c >> +++ b/libavformat/sdp.c >> @@ -347,7 +347,8 @@ static char *extradata2config(AVFormatContext *s, >> AVCodecParameters *par) >> >> static char *xiph_extradata2config(AVFormatContext *s, AVCodecParameters >> *par) >> { >> -char *config, *encoded_config; >> +uint8_t *config; >> +char *encoded_config; >> const uint8_t *header_start[3]; >> int headers_len, header_len[3], config_len; >> int first_header_size; > > LGTM Patch applied. Thank you, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH]lavf/sdp: Change configuration pointer from char* to uint8_t*.
On Fri, Mar 15, 2019 at 12:56:05AM +0100, Carl Eugen Hoyos wrote: > Hi! > > Attached patch silences three warnings with clang and makes the > pointer type equal to what the function called with the pointer > expects. > > Please comment, Carl Eugen > sdp.c |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > 9f10029889140041ba33ed19e96c3a296f2edf85 > 0001-lavf-sdp-Change-pointer-to-configuration-from-char-t.patch > From cf06b8cc09acd676ac6fb713168c23342d26e1b8 Mon Sep 17 00:00:00 2001 > From: Carl Eugen Hoyos > Date: Fri, 15 Mar 2019 00:52:50 +0100 > Subject: [PATCH] lavf/sdp: Change pointer to configuration from char* to > uint8_t*. > > This is also what av_base64_encode() expects. > Fixes the following warnings with clang: > libavformat/sdp.c:394:40: warning: implicit conversion from 'int' to 'char' > changes value from 254 to -2 > libavformat/sdp.c:395:40: warning: implicit conversion from 'int' to 'char' > changes value from 205 to -51 > libavformat/sdp.c:396:40: warning: implicit conversion from 'int' to 'char' > changes value from 186 to -70 > --- > libavformat/sdp.c |3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/libavformat/sdp.c b/libavformat/sdp.c > index a5d202e..34e9839 100644 > --- a/libavformat/sdp.c > +++ b/libavformat/sdp.c > @@ -347,7 +347,8 @@ static char *extradata2config(AVFormatContext *s, > AVCodecParameters *par) > > static char *xiph_extradata2config(AVFormatContext *s, AVCodecParameters > *par) > { > -char *config, *encoded_config; > +uint8_t *config; > +char *encoded_config; > const uint8_t *header_start[3]; > int headers_len, header_len[3], config_len; > int first_header_size; LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Concerning the gods, I have no means of knowing whether they exist or not or of what sort they may be, because of the obscurity of the subject, and the brevity of human life -- Protagoras signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel