On Sat, Sep 23, 2017 at 04:46:11PM +0100, Mark Thompson wrote:
> On 22/09/17 15:24, James Almer wrote:
> > On 9/21/2017 8:51 AM, Vittorio Giovara wrote:
> >> ---
> >> This is to silence this warning (which, admittedly, could also be ignored)
> >>
> >> cbs_h2645.c:1007:58: warning: variable 'sps_ext' is uninitialized when 
> >> used here [-Wuninitialized]
> >>     err = cbs_h264_write_sps_extension(ctx, pbc, sps_ext);
> >>                                                     ^~~~~~~
> >> cbs_h2645.c:1005:41: note: initialize the variable 'sps_ext' to silence 
> >> this warning
> >>     H264RawSPSExtension *sps_ext;
> >>                         ^
> >>                                 = NULL
> >> --- a/libavcodec/cbs_h2645.c
> >> +++ b/libavcodec/cbs_h2645.c
> >> @@ -1002,7 +1002,7 @@ static int 
> >> cbs_h264_write_nal_unit(CodedBitstreamContext *ctx,
> >>  
> >>      case H264_NAL_SPS_EXT:
> >>          {
> >> -            H264RawSPSExtension *sps_ext;
> >> +            H264RawSPSExtension *sps_ext = NULL;
> > 
> > Judging by how other NAL units are handled in this function, I think
> > this should be
> > 
> > H264RawSPSExtension *sps_ext = unit->content;
> > 
> > Guess no fate test has a sample with an SPS ext unit?
> 
> Yes, it needs the alphaconformanceG file which is not in the fate suite.  (I 
> guess I only tested trace_headers, not h264_metdata.)
> 
> --- a/libavcodec/cbs_h2645.c
> +++ b/libavcodec/cbs_h2645.c
> @@ -1002,7 +1002,7 @@ static int 
> cbs_h264_write_nal_unit(CodedBitstreamContext *ctx,
>  
>      case H264_NAL_SPS_EXT:
>          {
> -            H264RawSPSExtension *sps_ext;
> +            H264RawSPSExtension *sps_ext = unit->content;
>  
>              err = cbs_h264_write_sps_extension(ctx, pbc, sps_ext);
>              if (err < 0)
> @@ -1026,6 +1026,7 @@ static int 
> cbs_h264_write_nal_unit(CodedBitstreamContext *ctx,
>  
>      case H264_NAL_SLICE:
>      case H264_NAL_IDR_SLICE:
> +    case H264_NAL_AUXILIARY_SLICE:
>          {
>              H264RawSlice *slice = unit->content;
>              BitstreamContext bc;

LGTM

Diego
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to