On 11/3/2017 4:42 PM, Luca Barbato wrote:
> On 03/11/2017 19:23, Kieran Kunhya wrote:
>> This patch fixes very high memory usage on pathological streams.
> 
> this hunk seems spurious (and should not even compile with gcc).

It does, but complains about mixed declarations and code.

It's in any case a pointless change. zero initialization like it's
currently doing is valid.

> 
> diff --git a/libavcodec/h264_parse.c b/libavcodec/h264_parse.c
> index a7c71d9..2ddbbf9 100644
> --- a/libavcodec/h264_parse.c
> +++ b/libavcodec/h264_parse.c
> @@ -349,7 +349,8 @@ int ff_h264_init_poc(int pic_field_poc[2], int
> *pic_poc,
>  static int decode_extradata_ps(const uint8_t *data, int size,
> H264ParamSets *ps,
>                                 int is_avc, void *logctx)
>  {
> -    H2645Packet pkt = { 0 };
> +    H2645Packet pkt;
> +    memset(&pkt, 0, sizeof(pkt));
>      int i, ret = 0;
> 
>      ret = ff_h2645_packet_split(&pkt, data, size, logctx, is_avc, 2,
> AV_CODEC_ID_H264, 1);
> 
> lu
> _______________________________________________
> libav-devel mailing list
> libav-devel@libav.org
> https://lists.libav.org/mailman/listinfo/libav-devel

_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to