Unified · Split
| @@ -348,7 +348,7 @@ static int ogg_build_speex_headers(AVCodecContext *avctx, · 347 unmodified lines | ||
| 348 | 348 | uint8_t *p; |
| 349 | 349 | |
| 350 | 350 | if (avctx->extradata_size < SPEEX_HEADER_SIZE) |
| 351 | − return -1; | |
| 351 | + return AVERROR_INVALIDDATA; | |
| 352 | 352 | |
| 353 | 353 | // first packet: Speex header |
| 354 | 354 | p = av_mallocz(SPEEX_HEADER_SIZE); |
| @@ -377,7 +377,7 @@ static int ogg_build_opus_headers(AVCodecContext *avctx, · 22 unmodified lines | ||
| 377 | 377 | uint8_t *p; |
| 378 | 378 | |
| 379 | 379 | if (avctx->extradata_size < OPUS_HEADER_SIZE) |
| 380 | − return -1; | |
| 380 | + return AVERROR_INVALIDDATA; | |
| 381 | 381 | |
| 382 | 382 | /* first packet: Opus header */ |
| 383 | 383 | p = av_mallocz(avctx->extradata_size); |
| @@ -446,12 +446,12 @@ static int ogg_write_header(AVFormatContext *s) · 62 unmodified lines | ||
| 446 | 446 | st->codec->codec_id != AV_CODEC_ID_FLAC && |
| 447 | 447 | st->codec->codec_id != AV_CODEC_ID_OPUS) { |
| 448 | 448 | av_log(s, AV_LOG_ERROR, "Unsupported codec id in stream %d\n", i); |
| 449 | − return -1; | |
| 449 | + return AVERROR(EINVAL); | |
| 450 | 450 | } |
| 451 | 451 | |
| 452 | 452 | if (!st->codec->extradata || !st->codec->extradata_size) { |
| 453 | 453 | av_log(s, AV_LOG_ERROR, "No extradata present\n"); |
| 454 | − return -1; | |
| 454 | + return AVERROR_INVALIDDATA; | |
| 455 | 455 | } |
| 456 | 456 | oggstream = av_mallocz(sizeof(*oggstream)); |
| 457 | 457 | if (!oggstream) |
| @@ -511,7 +511,7 @@ static int ogg_write_header(AVFormatContext *s) · 53 unmodified lines | ||
| 511 | 511 | oggstream->header, oggstream->header_len) < 0) { |
| 512 | 512 | av_log(s, AV_LOG_ERROR, "Extradata corrupted\n"); |
| 513 | 513 | av_freep(&st->priv_data); |
| 514 | − return -1; | |
| 514 | + return AVERROR_INVALIDDATA; | |
| 515 | 515 | } |
| 516 | 516 | |
| 517 | 517 | p = ogg_write_vorbiscomment(7, s->flags & AVFMT_FLAG_BITEXACT, |