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

Function dec_free

fftools/ffmpeg_dec.c:118–147  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116} DecThreadContext;
117
118void dec_free(Decoder **pdec)
119{
120 Decoder *dec = *pdec;
121 DecoderPriv *dp;
122
123 if (!dec)
124 return;
125 dp = dp_from_dec(dec);
126
127 avcodec_free_context(&dp->dec_ctx);
128
129 av_frame_free(&dp->frame);
130 av_frame_free(&dp->frame_tmp_ref);
131 av_packet_free(&dp->pkt);
132
133 av_dict_free(&dp->standalone_init.opts);
134
135 for (int i = 0; i < FF_ARRAY_ELEMS(dp->sub_prev); i++)
136 av_frame_free(&dp->sub_prev[i]);
137 av_frame_free(&dp->sub_heartbeat);
138
139 av_freep(&dp->dec.subtitle_header);
140
141 av_freep(&dp->parent_name);
142
143 av_freep(&dp->views_requested);
144 av_freep(&dp->view_map);
145
146 av_freep(pdec);
147}
148
149static const char *dec_item_name(void *obj)
150{

Callers 5

ffmpeg_cleanupFunction · 0.85
dec_allocFunction · 0.85
dec_initFunction · 0.85
dec_createFunction · 0.85
ist_freeFunction · 0.85

Calls 6

dp_from_decFunction · 0.85
avcodec_free_contextFunction · 0.85
av_frame_freeFunction · 0.85
av_packet_freeFunction · 0.85
av_dict_freeFunction · 0.85
av_freepFunction · 0.85

Tested by

no test coverage detected