Browse Source

lavf: allow avformat_close_input() with NULL

This is consistent with how other destructors behave.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
tags/n4.0
wm4 Anton Khirnov 7 years ago
parent
commit
2b1324bd16
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      libavformat/utils.c

+ 6
- 1
libavformat/utils.c View File

@@ -2733,7 +2733,12 @@ void avformat_free_context(AVFormatContext *s)
void avformat_close_input(AVFormatContext **ps)
{
AVFormatContext *s = *ps;
AVIOContext *pb = s->pb;
AVIOContext *pb;

if (!*ps)
return;

pb = s->pb;

if ((s->iformat && s->iformat->flags & AVFMT_NOFILE) ||
(s->flags & AVFMT_FLAG_CUSTOM_IO))


Loading…
Cancel
Save