[FFmpeg-cvslog] vf_hwdownload: allocate the destination frame for the pool size

Anton Khirnov git at videolan.org
Sun Nov 13 23:37:17 EET 2016


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Apr 15 10:44:02 2016 +0200| [c3f113d58488df7594a489bdbb993a69ad47063c] | committer: Anton Khirnov

vf_hwdownload: allocate the destination frame for the pool size

The reasoning is the same as for the previous commit.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c3f113d58488df7594a489bdbb993a69ad47063c
---

 libavfilter/vf_hwdownload.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c
index 4ba465b..42925b8 100644
--- a/libavfilter/vf_hwdownload.c
+++ b/libavfilter/vf_hwdownload.c
@@ -140,7 +140,8 @@ static int hwdownload_filter_frame(AVFilterLink *link, AVFrame *input)
         goto fail;
     }
 
-    output = ff_get_video_buffer(outlink, outlink->w, outlink->h);
+    output = ff_get_video_buffer(outlink, ctx->hwframes->width,
+                                 ctx->hwframes->height);
     if (!output) {
         err = AVERROR(ENOMEM);
         goto fail;
@@ -152,6 +153,9 @@ static int hwdownload_filter_frame(AVFilterLink *link, AVFrame *input)
         goto fail;
     }
 
+    output->width  = outlink->w;
+    output->height = outlink->h;
+
     err = av_frame_copy_props(output, input);
     if (err < 0)
         goto fail;



More information about the ffmpeg-cvslog mailing list