You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Prevent segfault if iformat was not yet initialized.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
committed by
Michael Niedermayer
parent
366605ff5d
commit
9b01a8ad5e
@@ -2809,10 +2809,10 @@ void av_close_input_file(AVFormatContext *s)
|
||||
void avformat_close_input(AVFormatContext **ps)
|
||||
{
|
||||
AVFormatContext *s = *ps;
|
||||
AVIOContext *pb = (s->iformat->flags & AVFMT_NOFILE) || (s->flags & AVFMT_FLAG_CUSTOM_IO) ?
|
||||
AVIOContext *pb = (s->iformat && (s->iformat->flags & AVFMT_NOFILE)) || (s->flags & AVFMT_FLAG_CUSTOM_IO) ?
|
||||
NULL : s->pb;
|
||||
flush_packet_queue(s);
|
||||
if (s->iformat->read_close)
|
||||
if (s->iformat && (s->iformat->read_close))
|
||||
s->iformat->read_close(s);
|
||||
avformat_free_context(s);
|
||||
*ps = NULL;
|
||||
|
Reference in New Issue
Block a user