Merge commit '796dca027be09334d7bbf4f2ac1200e06bb054cb'
authorClément Bœsch <u@pkh.me>
Sun, 19 Mar 2017 16:36:17 +0000 (17:36 +0100)
committerClément Bœsch <u@pkh.me>
Sun, 19 Mar 2017 16:36:37 +0000 (17:36 +0100)
* commit '796dca027be09334d7bbf4f2ac1200e06bb054cb':
  alac: do not return success if nothing was decoded

See e11983bda073f8c63f60509ee753da9fba20ed10

Merged-by: Clément Bœsch <u@pkh.me>
1  2 
libavcodec/alac.c

@@@ -460,10 -457,7 +460,10 @@@ static int alac_decode_frame(AVCodecCon
                 avpkt->size * 8 - get_bits_count(&alac->gb));
      }
  
-     if (alac->channels == ch)
 -    *got_frame_ptr = 1;
++    if (alac->channels == ch && alac->nb_samples)
 +        *got_frame_ptr = 1;
 +    else
 +        av_log(avctx, AV_LOG_WARNING, "Failed to decode all channels\n");
  
      return avpkt->size;
  }