From: Hendrik Leppkes Date: Wed, 14 Oct 2015 13:00:53 +0000 (+0200) Subject: Merge commit '6fdd4c678ac1ce0776f9645cd534209e5f1ae1e3' X-Git-Tag: android-x86-7.1-r1~8537 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=3d93ff289e0421d71cd63e246727d8ace256f27d;p=android-x86%2Fexternal-ffmpeg.git Merge commit '6fdd4c678ac1ce0776f9645cd534209e5f1ae1e3' * commit '6fdd4c678ac1ce0776f9645cd534209e5f1ae1e3': libschroedinger: Properly use AVFrame API Merged-by: Hendrik Leppkes --- 3d93ff289e0421d71cd63e246727d8ace256f27d diff --cc libavcodec/libschroedinger.c index 9f0b25c02b,16e0fe89b9..0b02b2c240 --- a/libavcodec/libschroedinger.c +++ b/libavcodec/libschroedinger.c @@@ -190,9 -186,13 +186,12 @@@ SchroFrame *ff_create_schro_frame(AVCod uv_width = y_width >> (SCHRO_FRAME_FORMAT_H_SHIFT(schro_frame_fmt)); uv_height = y_height >> (SCHRO_FRAME_FORMAT_V_SHIFT(schro_frame_fmt)); - p_pic = av_mallocz(sizeof(AVPicture)); - if (!p_pic || avpicture_alloc(p_pic, avctx->pix_fmt, y_width, y_height) < 0) { - av_free(p_pic); + p_pic = av_frame_alloc(); + if (!p_pic) + return NULL; + + if (ff_get_buffer(avctx, p_pic, AV_GET_BUFFER_FLAG_REF) < 0) { + av_frame_free(&p_pic); - av_log(avctx, AV_LOG_ERROR, "Unable to allocate buffer\n"); return NULL; } diff --cc libavcodec/libschroedingerenc.c index d70552ed56,f390e4690e..c5d6e764c7 --- a/libavcodec/libschroedingerenc.c +++ b/libavcodec/libschroedingerenc.c @@@ -32,7 -32,8 +32,9 @@@ #include #include "libavutil/attributes.h" +#include "libavutil/avassert.h" + #include "libavutil/imgutils.h" + #include "avcodec.h" #include "internal.h" #include "libschroedinger.h"