[FFmpeg-devel] [PATCH] avcodec/libstagefright: drop dependancy on sizeof(AVFrame)

Michael Niedermayer michaelni at gmx.at
Tue Dec 17 17:29:25 CET 2013


untested

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
 libavcodec/libstagefright.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/libstagefright.cpp b/libavcodec/libstagefright.cpp
index bb49d8a..346cc9c 100644
--- a/libavcodec/libstagefright.cpp
+++ b/libavcodec/libstagefright.cpp
@@ -179,7 +179,7 @@ void* decode_thread(void *arg)
             sp<MetaData> outFormat = (*s->decoder)->getFormat();
             outFormat->findInt32(kKeyWidth , &w);
             outFormat->findInt32(kKeyHeight, &h);
-            frame->vframe = (AVFrame*)av_mallocz(sizeof(AVFrame));
+            frame->vframe = av_frame_alloc();
             if (!frame->vframe) {
                 frame->status = AVERROR(ENOMEM);
                 decode_done   = 1;
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list