Message ID | 20190826205040.14962-1-tfoucu@gmail.com |
---|---|
State | Accepted |
Commit | a80fdbcf13919d1280278e71c4ae29e760fb82ab |
Headers | show |
Probably OK On Mon, Aug 26, 2019 at 10:51 PM Thierry Foucu <tfoucu@gmail.com> wrote: > Follow the description of av_realloc, the memory needs to be allocated > by av_realloc. > --- > 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 69ea6dc6bb..8da8421e47 100644 > --- a/libavcodec/cbs_h2645.c > +++ b/libavcodec/cbs_h2645.c > @@ -1457,7 +1457,7 @@ static int > cbs_h2645_assemble_fragment(CodedBitstreamContext *ctx, > max_size += 3 + frag->units[i].data_size * 3 / 2; > } > > - data = av_malloc(max_size + AV_INPUT_BUFFER_PADDING_SIZE); > + data = av_realloc(NULL, max_size + AV_INPUT_BUFFER_PADDING_SIZE); > if (!data) > return AVERROR(ENOMEM); > > -- > 2.23.0.187.g17f5b7556c-goog > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
On Tue, Aug 27, 2019 at 6:39 AM Paul B Mahol <onemda@gmail.com> wrote: > Probably OK > Thanks Paul. Any change to have someone to push it? Cheers > > On Mon, Aug 26, 2019 at 10:51 PM Thierry Foucu <tfoucu@gmail.com> wrote: > > > Follow the description of av_realloc, the memory needs to be allocated > > by av_realloc. > > --- > > 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 69ea6dc6bb..8da8421e47 100644 > > --- a/libavcodec/cbs_h2645.c > > +++ b/libavcodec/cbs_h2645.c > > @@ -1457,7 +1457,7 @@ static int > > cbs_h2645_assemble_fragment(CodedBitstreamContext *ctx, > > max_size += 3 + frag->units[i].data_size * 3 / 2; > > } > > > > - data = av_malloc(max_size + AV_INPUT_BUFFER_PADDING_SIZE); > > + data = av_realloc(NULL, max_size + AV_INPUT_BUFFER_PADDING_SIZE); > > if (!data) > > return AVERROR(ENOMEM); > > > > -- > > 2.23.0.187.g17f5b7556c-goog > > > > _______________________________________________ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > To unsubscribe, visit link above, or email > > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
Am Mo., 26. Aug. 2019 um 22:51 Uhr schrieb Thierry Foucu <tfoucu@gmail.com>: > > Follow the description of av_realloc, the memory needs to be allocated > by av_realloc. Patch applied. Thank you, Carl Eugen
diff --git a/libavcodec/cbs_h2645.c b/libavcodec/cbs_h2645.c index 69ea6dc6bb..8da8421e47 100644 --- a/libavcodec/cbs_h2645.c +++ b/libavcodec/cbs_h2645.c @@ -1457,7 +1457,7 @@ static int cbs_h2645_assemble_fragment(CodedBitstreamContext *ctx, max_size += 3 + frag->units[i].data_size * 3 / 2; } - data = av_malloc(max_size + AV_INPUT_BUFFER_PADDING_SIZE); + data = av_realloc(NULL, max_size + AV_INPUT_BUFFER_PADDING_SIZE); if (!data) return AVERROR(ENOMEM);