examples/muxing: fix memory leak.
authorNicolas George <nicolas.george@normalesup.org>
Tue, 5 Mar 2013 14:19:47 +0000 (15:19 +0100)
committerNicolas George <nicolas.george@normalesup.org>
Tue, 5 Mar 2013 14:43:32 +0000 (15:43 +0100)
commit9b211c43dc5f2e618f204c4a7fd184eb2ea51f02
tree46b46a32a32f339484295bfff031ef97fdba9441
parentad4855613520fd14e90ff8c551bfd99cd464e080
examples/muxing: fix memory leak.

Do not re-call avcodec_get_context_defaults3(), it is already
called by avformat_new_stream() and it leaks the codec
priv_data that was already allocated.

Use avformat_free_context() instead of freeing (not)
everything manually.

Fix trac ticket #2322.
doc/examples/muxing.c