[FFmpeg-cvslog] examples/decode_audio: flush the decoder

Anton Khirnov git at videolan.org
Tue Apr 4 12:40:08 EEST 2017


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Oct 19 21:56:22 2016 +0200| [fee0f1de2c6a9924acb74013436dbea8f2bd1ecb] | committer: Anton Khirnov

examples/decode_audio: flush the decoder

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fee0f1de2c6a9924acb74013436dbea8f2bd1ecb
---

 doc/examples/decode_audio.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/doc/examples/decode_audio.c b/doc/examples/decode_audio.c
index e7b27d3..d952b49 100644
--- a/doc/examples/decode_audio.c
+++ b/doc/examples/decode_audio.c
@@ -179,6 +179,11 @@ int main(int argc, char **argv)
         }
     }
 
+    /* flush the decoder */
+    pkt->data = NULL;
+    pkt->size = 0;
+    decode(c, pkt, decoded_frame, outfile);
+
     fclose(outfile);
     fclose(f);
 



More information about the ffmpeg-cvslog mailing list