Showing the changes to libavcodec/api-example.c (1 of 5 files). Show all
Unified · Split
| @@ -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 | ||