History

Use avcodec_free_frame() to free AVFrames.

Anton Khirnov committed 14 years ago

Commit 11d1ca41 parent 9eb29655 files · +10 −9Browse files

Unified · Split

5 files
  1. avconv.c +2 −2
  2. avplay.c +2 −2
  3. libavcodec/api-example.c +4 −4
  4. libavfilter/vsrc_movie.c +1 −1
  5. libavformat/output-example.c +1 −0
avconv.c+2−2
@@ -180,11 +180,11 @@ void exit_program(int ret) · 179 unmodified lines
180 bsfc = next;180 bsfc = next;
181 }181 }
182 output_streams[i]->bitstream_filters = NULL;182 output_streams[i]->bitstream_filters = NULL;
183 avcodec_free_frame(&output_streams[i]->filtered_frame);
183 184
184 av_freep(&output_streams[i]->forced_keyframes);185 av_freep(&output_streams[i]->forced_keyframes);
185 av_freep(&output_streams[i]->avfilter);186 av_freep(&output_streams[i]->avfilter);
186 av_freep(&output_streams[i]->logfile_prefix);187 av_freep(&output_streams[i]->logfile_prefix);
187 av_freep(&output_streams[i]->filtered_frame);
188 av_freep(&output_streams[i]);188 av_freep(&output_streams[i]);
189 }189 }
190 for (i = 0; i < nb_input_files; i++) {190 for (i = 0; i < nb_input_files; i++) {
@@ -192,7 +192,7 @@ void exit_program(int ret) · 1 unmodified line
192 av_freep(&input_files[i]);192 av_freep(&input_files[i]);
193 }193 }
194 for (i = 0; i < nb_input_streams; i++) {194 for (i = 0; i < nb_input_streams; i++) {
195 av_freep(&input_streams[i]->decoded_frame);195 avcodec_free_frame(&input_streams[i]->decoded_frame);
196 av_dict_free(&input_streams[i]->opts);196 av_dict_free(&input_streams[i]->opts);
197 free_buffer_pool(&input_streams[i]->buffer_pool);197 free_buffer_pool(&input_streams[i]->buffer_pool);
198 av_freep(&input_streams[i]->filters);198 av_freep(&input_streams[i]->filters);
avplay.c+2−2
@@ -1704,7 +1704,7 @@ static int video_thread(void *arg) · 1703 unmodified lines
1704 avfilter_graph_free(&graph);1704 avfilter_graph_free(&graph);
1705#endif1705#endif
1706 av_free_packet(&pkt);1706 av_free_packet(&pkt);
1707 av_free(frame);1707 avcodec_free_frame(&frame);
1708 return 0;1708 return 0;
1709}1709}
1710 1710
@@ -2191,7 +2191,7 @@ static void stream_component_close(VideoState *is, int stream_index) · 480 unmodified lines
2191 avresample_free(&is->avr);2191 avresample_free(&is->avr);
2192 av_freep(&is->audio_buf1);2192 av_freep(&is->audio_buf1);
2193 is->audio_buf = NULL;2193 is->audio_buf = NULL;
2194 av_freep(&is->frame);2194 avcodec_free_frame(&is->frame);
2195 2195
2196 if (is->rdft) {2196 if (is->rdft) {
2197 av_rdft_end(is->rdft);2197 av_rdft_end(is->rdft);
libavcodec/api-example.c+4−4
@@ -212,7 +212,7 @@ static void audio_encode_example(const char *filename) · 211 unmodified lines
212 fclose(f);212 fclose(f);
213 213
214 av_freep(&samples);214 av_freep(&samples);
215 av_freep(&frame);215 avcodec_free_frame(&frame);
216 avcodec_close(c);216 avcodec_close(c);
217 av_free(c);217 av_free(c);
218}218}
@@ -308,7 +308,7 @@ static void audio_decode_example(const char *outfilename, const char *filename) · 89 unmodified lines
308 308
309 avcodec_close(c);309 avcodec_close(c);
310 av_free(c);310 av_free(c);
311 av_free(decoded_frame);311 avcodec_free_frame(&decoded_frame);
312}312}
313 313
314/*314/*
@@ -432,7 +432,7 @@ static void video_encode_example(const char *filename) · 117 unmodified lines
432 avcodec_close(c);432 avcodec_close(c);
433 av_free(c);433 av_free(c);
434 av_freep(&picture->data[0]);434 av_freep(&picture->data[0]);
435 av_free(picture);435 avcodec_free_frame(&picture);
436 printf("\n");436 printf("\n");
437}437}
438 438
@@ -568,7 +568,7 @@ static void video_decode_example(const char *outfilename, const char *filename) · 129 unmodified lines
568 568
569 avcodec_close(c);569 avcodec_close(c);
570 av_free(c);570 av_free(c);
571 av_free(picture);571 avcodec_free_frame(&picture);
572 printf("\n");572 printf("\n");
573}573}
574 574
libavfilter/vsrc_movie.c+1−1
@@ -197,7 +197,7 @@ static av_cold void uninit(AVFilterContext *ctx) · 196 unmodified lines
197 if (movie->format_ctx)197 if (movie->format_ctx)
198 avformat_close_input(&movie->format_ctx);198 avformat_close_input(&movie->format_ctx);
199 avfilter_unref_buffer(movie->picref);199 avfilter_unref_buffer(movie->picref);
200 av_freep(&movie->frame);200 avcodec_free_frame(&movie->frame);
201}201}
202 202
203static int query_formats(AVFilterContext *ctx)203static int query_formats(AVFilterContext *ctx)
libavformat/output-example.c+1−0
@@ -165,6 +165,7 @@ static void write_audio_frame(AVFormatContext *oc, AVStream *st) · 164 unmodified lines
165 fprintf(stderr, "Error while writing audio frame\n");165 fprintf(stderr, "Error while writing audio frame\n");
166 exit(1);166 exit(1);
167 }167 }
168 avcodec_free_frame(&frame);
168}169}
169 170
170static void close_audio(AVFormatContext *oc, AVStream *st)171static void close_audio(AVFormatContext *oc, AVStream *st)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t