Skip to content
Snippets Groups Projects
Commit d8b7b352 authored by Michel Bardiaux's avatar Michel Bardiaux Committed by Panagiotis Issaris
Browse files

Fix segfault in bmp decoder. Patch by Michel Bardiaux mbardiaux mediaxim dot be.

Originally committed as revision 7757 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 753c9d32
No related branches found
No related tags found
No related merge requests found
...@@ -158,6 +158,9 @@ static int bmp_decode_frame(AVCodecContext *avctx, ...@@ -158,6 +158,9 @@ static int bmp_decode_frame(AVCodecContext *avctx,
return -1; return -1;
} }
if(p->data[0])
avctx->release_buffer(avctx, p);
p->reference = 0; p->reference = 0;
if(avctx->get_buffer(avctx, p) < 0){ if(avctx->get_buffer(avctx, p) < 0){
av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n"); av_log(avctx, AV_LOG_ERROR, "get_buffer() failed\n");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment