Message ID | 1424378051-6607-12-git-send-email-martin@martin.st |
---|---|
State | Committed |
Headers | show |
On Thu, Feb 19, 2015 at 10:34:10PM +0200, Martin Storsjö wrote: > --- a/libavformat/rtpdec_hevc.c > +++ b/libavformat/rtpdec_hevc.c > @@ -91,8 +91,8 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, > if (!strcmp(attr, "sprop-vps") || !strcmp(attr, "sprop-sps") || > !strcmp(attr, "sprop-pps") || !strcmp(attr, "sprop-sei")) { > - uint8_t **data_ptr; > - int *size_ptr; > + uint8_t **data_ptr = NULL; > + int *size_ptr = 0; Shouldn't both be NULL? Diego
On Thu, 19 Feb 2015, Diego Biurrun wrote: > On Thu, Feb 19, 2015 at 10:34:10PM +0200, Martin Storsjö wrote: >> --- a/libavformat/rtpdec_hevc.c >> +++ b/libavformat/rtpdec_hevc.c >> @@ -91,8 +91,8 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, >> if (!strcmp(attr, "sprop-vps") || !strcmp(attr, "sprop-sps") || >> !strcmp(attr, "sprop-pps") || !strcmp(attr, "sprop-sei")) { >> - uint8_t **data_ptr; >> - int *size_ptr; >> + uint8_t **data_ptr = NULL; >> + int *size_ptr = 0; > > Shouldn't both be NULL? Oh, indeed. Fixed locally. // Martin
On Fri, Feb 20, 2015 at 12:11:31PM +0200, Martin Storsjö wrote: > On Thu, 19 Feb 2015, Diego Biurrun wrote: > >On Thu, Feb 19, 2015 at 10:34:10PM +0200, Martin Storsjö wrote: > >>--- a/libavformat/rtpdec_hevc.c > >>+++ b/libavformat/rtpdec_hevc.c > >>@@ -91,8 +91,8 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, > >> if (!strcmp(attr, "sprop-vps") || !strcmp(attr, "sprop-sps") || > >> !strcmp(attr, "sprop-pps") || !strcmp(attr, "sprop-sei")) { > >>- uint8_t **data_ptr; > >>- int *size_ptr; > >>+ uint8_t **data_ptr = NULL; > >>+ int *size_ptr = 0; > > > >Shouldn't both be NULL? > > Oh, indeed. Fixed locally. OK then. Diego
diff --git a/libavformat/rtpdec_hevc.c b/libavformat/rtpdec_hevc.c index 13df942..ddb24aa 100644 --- a/libavformat/rtpdec_hevc.c +++ b/libavformat/rtpdec_hevc.c @@ -91,8 +91,8 @@ static av_cold int hevc_sdp_parse_fmtp_config(AVFormatContext *s, /* sprop-sei: [base64] */ if (!strcmp(attr, "sprop-vps") || !strcmp(attr, "sprop-sps") || !strcmp(attr, "sprop-pps") || !strcmp(attr, "sprop-sei")) { - uint8_t **data_ptr; - int *size_ptr; + uint8_t **data_ptr = NULL; + int *size_ptr = 0; if (!strcmp(attr, "sprop-vps")) { data_ptr = &hevc_data->vps; size_ptr = &hevc_data->vps_size;