]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/g726.c
h264: reset last_pocs on IDRs
[ffmpeg] / libavcodec / g726.c
index f14958a55da705e51b0cff0258b8cfd9b88eb734..ae1b5a300165d22e43c5b4faa362e9b9e2b97ec9 100644 (file)
@@ -5,20 +5,20 @@
  * This is a very straightforward rendition of the G.726
  * Section 4 "Computational Details".
  *
- * This file is part of Libav.
+ * This file is part of FFmpeg.
  *
- * Libav is free software; you can redistribute it and/or
+ * FFmpeg is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either
  * version 2.1 of the License, or (at your option) any later version.
  *
- * Libav is distributed in the hope that it will be useful,
+ * FFmpeg is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * Lesser General Public License for more details.
  *
  * You should have received a copy of the GNU Lesser General Public
- * License along with Libav; if not, write to the Free Software
+ * License along with FFmpeg; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 #include <limits.h>
@@ -460,6 +460,12 @@ static int g726_decode_frame(AVCodecContext *avctx,
     return buf_size;
 }
 
+static void g726_decode_flush(AVCodecContext *avctx)
+{
+    G726Context *c = avctx->priv_data;
+    g726_reset(c);
+}
+
 AVCodec ff_adpcm_g726_decoder = {
     .name           = "g726",
     .type           = AVMEDIA_TYPE_AUDIO,
@@ -467,6 +473,7 @@ AVCodec ff_adpcm_g726_decoder = {
     .priv_data_size = sizeof(G726Context),
     .init           = g726_decode_init,
     .decode         = g726_decode_frame,
+    .flush          = g726_decode_flush,
     .long_name = NULL_IF_CONFIG_SMALL("G.726 ADPCM"),
 };
 #endif