aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/api-example.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-09-21 09:10:23 +0200
committerAnton Khirnov <anton@khirnov.net>2012-09-24 12:31:25 +0200
commit11d1ca4b2c406bee2d22b04268a43b0873096c92 (patch)
tree4ceb6b2a73ffa7525588029614eb1b437a8c04d3 /libavcodec/api-example.c
parent9eb296572ec801c32d86b349ba1de27704953237 (diff)
downloadffmpeg-11d1ca4b2c406bee2d22b04268a43b0873096c92.tar.gz
Use avcodec_free_frame() to free AVFrames.
Diffstat (limited to 'libavcodec/api-example.c')
-rw-r--r--libavcodec/api-example.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/api-example.c b/libavcodec/api-example.c
index d0253542dd..62750804ba 100644
--- a/libavcodec/api-example.c
+++ b/libavcodec/api-example.c
@@ -212,7 +212,7 @@ static void audio_encode_example(const char *filename)
fclose(f);
av_freep(&samples);
- av_freep(&frame);
+ avcodec_free_frame(&frame);
avcodec_close(c);
av_free(c);
}
@@ -308,7 +308,7 @@ static void audio_decode_example(const char *outfilename, const char *filename)
avcodec_close(c);
av_free(c);
- av_free(decoded_frame);
+ avcodec_free_frame(&decoded_frame);
}
/*
@@ -432,7 +432,7 @@ static void video_encode_example(const char *filename)
avcodec_close(c);
av_free(c);
av_freep(&picture->data[0]);
- av_free(picture);
+ avcodec_free_frame(&picture);
printf("\n");
}
@@ -568,7 +568,7 @@ static void video_decode_example(const char *outfilename, const char *filename)
avcodec_close(c);
av_free(c);
- av_free(picture);
+ avcodec_free_frame(&picture);
printf("\n");
}