Merge commit '771656bd85416cd6308b11aed6f2c69a8db9c21b'
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 18 Nov 2014 02:08:20 +0000 (03:08 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 18 Nov 2014 02:08:20 +0000 (03:08 +0100)
* commit '771656bd85416cd6308b11aed6f2c69a8db9c21b':
  libvpxenc: clean memory on error

Conflicts:
libavcodec/libvpxenc.c

See: 104b1d9e103f90485e894b20dd5bb3f1964fe5f3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
1  2 
libavcodec/libvpxenc.c

@@@ -642,9 -468,9 +642,9 @@@ static int queue_frames(AVCodecContext 
  
                  if (!cx_frame->buf) {
                      av_log(avctx, AV_LOG_ERROR,
 -                           "Data buffer alloc (%zu bytes) failed\n",
 +                           "Data buffer alloc (%"SIZE_SPECIFIER" bytes) failed\n",
                             cx_frame->sz);
-                     av_free(cx_frame);
+                     av_freep(&cx_frame);
                      return AVERROR(ENOMEM);
                  }
                  memcpy(cx_frame->buf, pkt->data.frame.buf, pkt->data.frame.sz);