MCPcopy Create free account
hub / github.com/FFmpeg/FFmpeg / avformat_close_input

Function avformat_close_input

libavformat/demux.c:377–400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375}
376
377void avformat_close_input(AVFormatContext **ps)
378{
379 AVFormatContext *s;
380 AVIOContext *pb;
381
382 if (!ps || !*ps)
383 return;
384
385 s = *ps;
386 pb = s->pb;
387
388 if ((s->iformat && strcmp(s->iformat->name, "image2") && s->iformat->flags & AVFMT_NOFILE) ||
389 (s->flags & AVFMT_FLAG_CUSTOM_IO))
390 pb = NULL;
391
392 if (s->iformat)
393 if (ffifmt(s->iformat)->read_close)
394 ffifmt(s->iformat)->read_close(s);
395
396 ff_format_io_close(s, &pb);
397 avformat_free_context(s);
398
399 *ps = NULL;
400}
401
402static void force_codec_ids(AVFormatContext *s, AVStream *st)
403{

Callers 15

handle_fileFunction · 0.85
mainFunction · 0.85
LLVMFuzzerTestOneInputFunction · 0.85
mainFunction · 0.85
handle_fileFunction · 0.85
ds_freeFunction · 0.85
free_representationFunction · 0.85
ff_rtsp_close_streamsFunction · 0.85
dvdvideo_subdemux_closeFunction · 0.85
avi_read_closeFunction · 0.85
ff_wms_parse_sdp_a_lineFunction · 0.85

Calls 3

ffifmtFunction · 0.85
ff_format_io_closeFunction · 0.85
avformat_free_contextFunction · 0.85

Tested by 5

mainFunction · 0.68
video_decodeFunction · 0.68
seek_testFunction · 0.68
dump_stream_metaFunction · 0.68
video_decode_exampleFunction · 0.68