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

Function ff_free_stream

libavformat/avformat.c:46–77  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44#include "url.h"
45
46void ff_free_stream(AVStream **pst)
47{
48 AVStream *st = *pst;
49 FFStream *const sti = ffstream(st);
50
51 if (!st)
52 return;
53
54 if (st->attached_pic.data)
55 av_packet_unref(&st->attached_pic);
56
57 av_parser_close(sti->parser);
58 avcodec_free_context(&sti->avctx);
59 av_bsf_free(&sti->bsfc);
60 av_freep(&sti->index_entries);
61 av_freep(&sti->probe_data.buf);
62
63 av_packet_free(&sti->parse_pkt);
64
65 av_bsf_free(&sti->extract_extradata.bsf);
66
67 if (sti->info) {
68 av_freep(&sti->info->duration_error);
69 av_freep(&sti->info);
70 }
71
72 av_dict_free(&st->metadata);
73 avcodec_parameters_free(&st->codecpar);
74 av_freep(&st->priv_data);
75
76 av_freep(pst);
77}
78
79void ff_free_stream_group(AVStreamGroup **pstg)
80{

Callers 3

avformat_new_streamFunction · 0.85
ff_remove_streamFunction · 0.85
avformat_free_contextFunction · 0.85

Calls 9

ffstreamFunction · 0.85
av_packet_unrefFunction · 0.85
av_parser_closeFunction · 0.85
avcodec_free_contextFunction · 0.85
av_bsf_freeFunction · 0.85
av_freepFunction · 0.85
av_packet_freeFunction · 0.85
av_dict_freeFunction · 0.85
avcodec_parameters_freeFunction · 0.85

Tested by

no test coverage detected