mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-16 22:01:15 +08:00
lavf: allow avformat_close_input() with NULL
This is consistent with how other destructors behave. Signed-off-by: Anton Khirnov <anton@khirnov.net>
This commit is contained in:
@@ -2733,7 +2733,12 @@ void avformat_free_context(AVFormatContext *s)
|
|||||||
void avformat_close_input(AVFormatContext **ps)
|
void avformat_close_input(AVFormatContext **ps)
|
||||||
{
|
{
|
||||||
AVFormatContext *s = *ps;
|
AVFormatContext *s = *ps;
|
||||||
AVIOContext *pb = s->pb;
|
AVIOContext *pb;
|
||||||
|
|
||||||
|
if (!*ps)
|
||||||
|
return;
|
||||||
|
|
||||||
|
pb = s->pb;
|
||||||
|
|
||||||
if ((s->iformat && s->iformat->flags & AVFMT_NOFILE) ||
|
if ((s->iformat && s->iformat->flags & AVFMT_NOFILE) ||
|
||||||
(s->flags & AVFMT_FLAG_CUSTOM_IO))
|
(s->flags & AVFMT_FLAG_CUSTOM_IO))
|
||||||
|
Reference in New Issue
Block a user