lavu/frame: fix malloc error path in av_frame_copy_props()

The error path frees all side data, but forgets to reset the side data
count. This can blow up later in av_frame_unref() and free_side_data().

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a400edbb6d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
wm4 2014-12-15 04:32:58 +01:00 committed by Michael Niedermayer
parent 844f7f78aa
commit df1ea139b4
1 changed files with 1 additions and 0 deletions

View File

@ -489,6 +489,7 @@ int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
av_dict_free(&dst->side_data[i]->metadata);
}
av_freep(&dst->side_data);
dst->nb_side_data = 0;
return AVERROR(ENOMEM);
}
memcpy(sd_dst->data, sd_src->data, sd_src->size);