History

Use avcodec_free_frame() to free AVFrames.

Anton Khirnov committed 14 years ago

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

Showing the changes to libavcodec/api-example.c (1 of 5 files). Show all

Unified · Split

libavcodec/api-example.c+4−4
@@ -212,7 +212,7 @@ static void audio_encode_example(const char *filename) · 211 unmodified lines
212212 fclose(f);
213213
214214 av_freep(&samples);
215− av_freep(&frame);
215+ avcodec_free_frame(&frame);
216216 avcodec_close(c);
217217 av_free(c);
218218 }
@@ -308,7 +308,7 @@ static void audio_decode_example(const char *outfilename, const char *filename) · 89 unmodified lines
308308
309309 avcodec_close(c);
310310 av_free(c);
311− av_free(decoded_frame);
311+ avcodec_free_frame(&decoded_frame);
312312 }
313313
314314 /*
@@ -432,7 +432,7 @@ static void video_encode_example(const char *filename) · 117 unmodified lines
432432 avcodec_close(c);
433433 av_free(c);
434434 av_freep(&picture->data[0]);
435− av_free(picture);
435+ avcodec_free_frame(&picture);
436436 printf("\n");
437437 }
438438
@@ -568,7 +568,7 @@ static void video_decode_example(const char *outfilename, const char *filename) · 129 unmodified lines
568568
569569 avcodec_close(c);
570570 av_free(c);
571− av_free(picture);
571+ avcodec_free_frame(&picture);
572572 printf("\n");
573573 }
574574

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