Browse Source

truespeech: check to make sure channels == 1

tags/n0.9
Justin Ruggles 14 years ago
parent
commit
3e7a176759
1 changed files with 5 additions and 0 deletions
  1. +5
    -0
      libavcodec/truespeech.c

+ 5
- 0
libavcodec/truespeech.c View File

@@ -56,6 +56,11 @@ static av_cold int truespeech_decode_init(AVCodecContext * avctx)
{
// TSContext *c = avctx->priv_data;

if (avctx->channels != 1) {
av_log_ask_for_sample(avctx, "Unsupported channel count: %d\n", avctx->channels);
return AVERROR(EINVAL);
}

avctx->sample_fmt = AV_SAMPLE_FMT_S16;
return 0;
}


Loading…
Cancel
Save