Mercurial > libavcodec.hg
comparison sonic.c @ 4520:9bf957e669f0 libavcodec
This fixes error handling for BeOS, removing the need for some ifdefs.
AVERROR_ defines are moved to avcodec.h as they are needed in there as well. Feel free to move that to avutil/common.h.
Bumped up avcodec/format version numbers as though it's binary compatible we will want to rebuild apps as error values changed.
Please from now on use return AVERROR(EFOO) instead of the ugly return -EFOO in your code.
This also removes the need for berrno.h.
author | mmu_man |
---|---|
date | Tue, 13 Feb 2007 18:26:14 +0000 |
parents | c8c591fe26f8 |
children | c2ab2ac31edb |
comparison
equal
deleted
inserted
replaced
4519:b08a4d11e01c | 4520:9bf957e669f0 |
---|---|
599 av_log(avctx, AV_LOG_INFO, "Sonic: ver: %d ls: %d dr: %d taps: %d block: %d frame: %d downsamp: %d\n", | 599 av_log(avctx, AV_LOG_INFO, "Sonic: ver: %d ls: %d dr: %d taps: %d block: %d frame: %d downsamp: %d\n", |
600 version, s->lossless, s->decorrelation, s->num_taps, s->block_align, s->frame_size, s->downsampling); | 600 version, s->lossless, s->decorrelation, s->num_taps, s->block_align, s->frame_size, s->downsampling); |
601 | 601 |
602 avctx->coded_frame = avcodec_alloc_frame(); | 602 avctx->coded_frame = avcodec_alloc_frame(); |
603 if (!avctx->coded_frame) | 603 if (!avctx->coded_frame) |
604 return -ENOMEM; | 604 return AVERROR(ENOMEM); |
605 avctx->coded_frame->key_frame = 1; | 605 avctx->coded_frame->key_frame = 1; |
606 avctx->frame_size = s->block_align*s->downsampling; | 606 avctx->frame_size = s->block_align*s->downsampling; |
607 | 607 |
608 return 0; | 608 return 0; |
609 } | 609 } |