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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user