Unified · Split
| @@ -180,11 +180,11 @@ void exit_program(int ret) · 179 unmodified lines | ||
| 180 | 180 | bsfc = next; |
| 181 | 181 | } |
| 182 | 182 | output_streams[i]->bitstream_filters = NULL; |
| 183 | + avcodec_free_frame(&output_streams[i]->filtered_frame); | |
| 183 | 184 | |
| 184 | 185 | av_freep(&output_streams[i]->forced_keyframes); |
| 185 | 186 | av_freep(&output_streams[i]->avfilter); |
| 186 | 187 | av_freep(&output_streams[i]->logfile_prefix); |
| 187 | − av_freep(&output_streams[i]->filtered_frame); | |
| 188 | 188 | av_freep(&output_streams[i]); |
| 189 | 189 | } |
| 190 | 190 | for (i = 0; i < nb_input_files; i++) { |
| @@ -192,7 +192,7 @@ void exit_program(int ret) · 1 unmodified line | ||
| 192 | 192 | av_freep(&input_files[i]); |
| 193 | 193 | } |
| 194 | 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 | 196 | av_dict_free(&input_streams[i]->opts); |
| 197 | 197 | free_buffer_pool(&input_streams[i]->buffer_pool); |
| 198 | 198 | av_freep(&input_streams[i]->filters); |
| @@ -1704,7 +1704,7 @@ static int video_thread(void *arg) · 1703 unmodified lines | ||
| 1704 | 1704 | avfilter_graph_free(&graph); |
| 1705 | 1705 | #endif |
| 1706 | 1706 | av_free_packet(&pkt); |
| 1707 | − av_free(frame); | |
| 1707 | + avcodec_free_frame(&frame); | |
| 1708 | 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 | 2191 | avresample_free(&is->avr); |
| 2192 | 2192 | av_freep(&is->audio_buf1); |
| 2193 | 2193 | is->audio_buf = NULL; |
| 2194 | − av_freep(&is->frame); | |
| 2194 | + avcodec_free_frame(&is->frame); | |
| 2195 | 2195 | |
| 2196 | 2196 | if (is->rdft) { |
| 2197 | 2197 | av_rdft_end(is->rdft); |
| @@ -212,7 +212,7 @@ static void audio_encode_example(const char *filename) · 211 unmodified lines | ||
| 212 | 212 | fclose(f); |
| 213 | 213 | |
| 214 | 214 | av_freep(&samples); |
| 215 | − av_freep(&frame); | |
| 215 | + avcodec_free_frame(&frame); | |
| 216 | 216 | avcodec_close(c); |
| 217 | 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 | 309 | avcodec_close(c); |
| 310 | 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 | 432 | avcodec_close(c); |
| 433 | 433 | av_free(c); |
| 434 | 434 | av_freep(&picture->data[0]); |
| 435 | − av_free(picture); | |
| 435 | + avcodec_free_frame(&picture); | |
| 436 | 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 | 569 | avcodec_close(c); |
| 570 | 570 | av_free(c); |
| 571 | − av_free(picture); | |
| 571 | + avcodec_free_frame(&picture); | |
| 572 | 572 | printf("\n"); |
| 573 | 573 | } |
| 574 | 574 | |
| @@ -197,7 +197,7 @@ static av_cold void uninit(AVFilterContext *ctx) · 196 unmodified lines | ||
| 197 | 197 | if (movie->format_ctx) |
| 198 | 198 | avformat_close_input(&movie->format_ctx); |
| 199 | 199 | avfilter_unref_buffer(movie->picref); |
| 200 | − av_freep(&movie->frame); | |
| 200 | + avcodec_free_frame(&movie->frame); | |
| 201 | 201 | } |
| 202 | 202 | |
| 203 | 203 | static int query_formats(AVFilterContext *ctx) |
| @@ -165,6 +165,7 @@ static void write_audio_frame(AVFormatContext *oc, AVStream *st) · 164 unmodified lines | ||
| 165 | 165 | fprintf(stderr, "Error while writing audio frame\n"); |
| 166 | 166 | exit(1); |
| 167 | 167 | } |
| 168 | + avcodec_free_frame(&frame); | |
| 168 | 169 | } |
| 169 | 170 | |
| 170 | 171 | static void close_audio(AVFormatContext *oc, AVStream *st) |