ffmpeg plugin: don't crash sniffing unknown files.
The Open method can fail and leave the StreamBase object without an IOContext, but the destructor tried to dereference it anyway. This fixes APlayer crashing on many files instead of skipping them.
This commit is contained in:
parent
38b150a9de
commit
9394e66cbc
@ -242,7 +242,8 @@ StreamBase::~StreamBase()
|
||||
avformat_close_input(&fContext);
|
||||
av_free_packet(&fPacket);
|
||||
av_free(fContext);
|
||||
av_free(fIOContext->buffer);
|
||||
if(fIOContext)
|
||||
av_free(fIOContext->buffer);
|
||||
av_free(fIOContext);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user