fix memleak, based upon a patch by Wolfram Gloger
[ffmpeg.git] / output_example.c
index 636ad6e..365a35e 100644 (file)
@@ -512,6 +512,7 @@ int main(int argc, char **argv)
 
     /* free the streams */
     for(i = 0; i < oc->nb_streams; i++) {
+        av_freep(&oc->streams[i]->codec);
         av_freep(&oc->streams[i]);
     }