comparison audio.c @ 1787:eb16c64144ee libavformat

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 2f59a73884af
children 62792a60f740
comparison
equal deleted inserted replaced
1786:8cc34fe98a3b 1787:eb16c64144ee
222 if (ap->sample_rate <= 0 || ap->channels <= 0) 222 if (ap->sample_rate <= 0 || ap->channels <= 0)
223 return -1; 223 return -1;
224 224
225 st = av_new_stream(s1, 0); 225 st = av_new_stream(s1, 0);
226 if (!st) { 226 if (!st) {
227 return -ENOMEM; 227 return AVERROR(ENOMEM);
228 } 228 }
229 s->sample_rate = ap->sample_rate; 229 s->sample_rate = ap->sample_rate;
230 s->channels = ap->channels; 230 s->channels = ap->channels;
231 231
232 ret = audio_open(s, 0, ap->device); 232 ret = audio_open(s, 0, ap->device);