Mercurial > libavcodec.hg
comparison g726.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 | 85438e10d72d |
children | a96d905dcbaa |
comparison
equal
deleted
inserted
replaced
4519:b08a4d11e01c | 4520:9bf957e669f0 |
---|---|
339 c->bit_buffer = 0; | 339 c->bit_buffer = 0; |
340 c->bits_left = 0; | 340 c->bits_left = 0; |
341 | 341 |
342 avctx->coded_frame = avcodec_alloc_frame(); | 342 avctx->coded_frame = avcodec_alloc_frame(); |
343 if (!avctx->coded_frame) | 343 if (!avctx->coded_frame) |
344 return -ENOMEM; | 344 return AVERROR(ENOMEM); |
345 avctx->coded_frame->key_frame = 1; | 345 avctx->coded_frame->key_frame = 1; |
346 | 346 |
347 return 0; | 347 return 0; |
348 } | 348 } |
349 | 349 |