diff options
author | Angelo Haller <angelo@szanni.org> | 2013-01-15 23:37:08 +0100 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2013-01-15 23:37:30 +0100 |
commit | e7a39e163ddbde85f966132194143d0338445a0c (patch) | |
tree | 6ddeb85113e9ce36c03eac6de740ef48cc037b67 /doc/examples/demuxing.c | |
parent | c92b6f347dca160fd9e072fbc1aaf996f7b1ae99 (diff) | |
download | ffmpeg-e7a39e163ddbde85f966132194143d0338445a0c.tar.gz |
examples/demuxing: free AVPacket after usage
Fix leak.
Diffstat (limited to 'doc/examples/demuxing.c')
-rw-r--r-- | doc/examples/demuxing.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/examples/demuxing.c b/doc/examples/demuxing.c index bee21b7b33..6780e070de 100644 --- a/doc/examples/demuxing.c +++ b/doc/examples/demuxing.c @@ -292,8 +292,10 @@ int main (int argc, char **argv) printf("Demuxing audio from file '%s' into '%s'\n", src_filename, audio_dst_filename); /* read frames from the file */ - while (av_read_frame(fmt_ctx, &pkt) >= 0) + while (av_read_frame(fmt_ctx, &pkt) >= 0) { decode_packet(&got_frame, 0); + av_free_packet(&pkt); + } /* flush cached frames */ pkt.data = NULL; |