Ticket #1899: imc_flush.diff

File imc_flush.diff, 1.2 KB (added by ami_stuff, 14 years ago)
  • libavcodec/imc.c

    diff --git a/libavcodec/imc.c b/libavcodec/imc.c
    index ba39d41..82ec891 100644
    a b static av_cold int imc_decode_close(AVCodecContext * avctx)  
    979979    return 0;
    980980}
    981981
     982static av_cold void flush(AVCodecContext *avctx)
     983{
     984    IMCContext *q = avctx->priv_data;
     985
     986    q->out_samples = 0;
     987}
     988
    982989#if CONFIG_IMC_DECODER
    983990AVCodec ff_imc_decoder = {
    984991    .name           = "imc",
    … … AVCodec ff_imc_decoder = {  
    988995    .init           = imc_decode_init,
    989996    .close          = imc_decode_close,
    990997    .decode         = imc_decode_frame,
     998    .flush          = flush,
    991999    .capabilities   = CODEC_CAP_DR1,
    9921000    .long_name      = NULL_IF_CONFIG_SMALL("IMC (Intel Music Coder)"),
    9931001    .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
    … … AVCodec ff_iac_decoder = {  
    10031011    .init           = imc_decode_init,
    10041012    .close          = imc_decode_close,
    10051013    .decode         = imc_decode_frame,
     1014    .flush          = flush,
    10061015    .capabilities   = CODEC_CAP_DR1,
    10071016    .long_name      = NULL_IF_CONFIG_SMALL("IAC (Indeo Audio Coder)"),
    10081017    .sample_fmts    = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,