[FFmpeg-cvslog] frame: fix the error path in av_frame_copy_props()

Roman Savchenko git at videolan.org
Thu May 29 12:43:59 CEST 2014


ffmpeg | branch: master | Roman Savchenko <gmstima at gmail.com> | Wed May 28 22:16:56 2014 +0200| [a53551cba86bb67efcb6105fdc337a36c43132bd] | committer: Anton Khirnov

frame: fix the error path in av_frame_copy_props()

First free metadata, then the side data it is contained in.

Signed-off-by: Anton Khirnov <anton at khirnov.net>

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

 libavutil/frame.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/frame.c b/libavutil/frame.c
index cc4bfcd..9048552 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -383,8 +383,8 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
         if (!sd_dst) {
             for (i = 0; i < dst->nb_side_data; i++) {
                 av_freep(&dst->side_data[i]->data);
-                av_freep(&dst->side_data[i]);
                 av_dict_free(&dst->side_data[i]->metadata);
+                av_freep(&dst->side_data[i]);
             }
             av_freep(&dst->side_data);
             return AVERROR(ENOMEM);



More information about the ffmpeg-cvslog mailing list