Browse Source

roqaudioenc: return AVERROR codes instead of -1

tags/n0.11
Justin Ruggles 13 years ago
parent
commit
f7a2e12f2a
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      libavcodec/roqaudioenc.c

+ 2
- 2
libavcodec/roqaudioenc.c View File

@@ -57,11 +57,11 @@ static av_cold int roq_dpcm_encode_init(AVCodecContext *avctx)


if (avctx->channels > 2) { if (avctx->channels > 2) {
av_log(avctx, AV_LOG_ERROR, "Audio must be mono or stereo\n"); av_log(avctx, AV_LOG_ERROR, "Audio must be mono or stereo\n");
return -1;
return AVERROR(EINVAL);
} }
if (avctx->sample_rate != 22050) { if (avctx->sample_rate != 22050) {
av_log(avctx, AV_LOG_ERROR, "Audio must be 22050 Hz\n"); av_log(avctx, AV_LOG_ERROR, "Audio must be 22050 Hz\n");
return -1;
return AVERROR(EINVAL);
} }


avctx->frame_size = ROQ_FRAME_SIZE; avctx->frame_size = ROQ_FRAME_SIZE;


Loading…
Cancel
Save