[08/13] examples/decode_audio: flush the decoder

Message ID 1478793085-10046-8-git-send-email-anton@khirnov.net
State New
Headers show

Commit Message

Anton Khirnov Nov. 10, 2016, 3:51 p.m.
---
 doc/examples/decode_audio.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Luca Barbato Nov. 15, 2016, 12:36 p.m. | #1
On 10/11/2016 16:51, Anton Khirnov wrote:
> +    decode(c, pkt, decoded_frame, outfile);

what about explicitly set the pkt ?

lu

Patch

diff --git a/doc/examples/decode_audio.c b/doc/examples/decode_audio.c
index e7b27d3..3e2a0c1 100644
--- a/doc/examples/decode_audio.c
+++ b/doc/examples/decode_audio.c
@@ -179,6 +179,9 @@  int main(int argc, char **argv)
         }
     }
 
+    /* flush the decoder */
+    decode(c, pkt, decoded_frame, outfile);
+
     fclose(outfile);
     fclose(f);