| 44 | #include "url.h" |
| 45 | |
| 46 | void 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 | |
| 79 | void ff_free_stream_group(AVStreamGroup **pstg) |
| 80 | { |
no test coverage detected