forked from bartvdbraak/blender
== FFMPEG ==
Fixes: [#10703] loading an .avi captured by dosbox causes a segfault We shouldn't try to close a codec, if we haven't managed to open one... :)
This commit is contained in:
parent
1989e757b0
commit
2b1797d07b
@ -305,13 +305,11 @@ static int isffmpeg (char *filename) {
|
||||
/* Find the decoder for the video stream */
|
||||
pCodec=avcodec_find_decoder(pCodecCtx->codec_id);
|
||||
if(pCodec==NULL) {
|
||||
avcodec_close(pCodecCtx);
|
||||
av_close_input_file(pFormatCtx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(avcodec_open(pCodecCtx, pCodec)<0) {
|
||||
avcodec_close(pCodecCtx);
|
||||
av_close_input_file(pFormatCtx);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user