Tested with the alphaconformanceG test sample.
---
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
>>
>> libavcodec/cbs_h2645.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
>> index 50a227da78..6fe138188a 100644
>> --- 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.)
>>
>> err = cbs_h264_write_sps_extension(ctx, pbc, sps_ext);
>> if (err < 0)
>>
libavcodec/cbs_h2645.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c
index 50a227da7..a1b887fd4 100644
--- 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;
--
2.14.1
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel