Mercurial > libavformat.hg
comparison westwood.c @ 2273:7eb456c4ed8a libavformat
Replace all occurrences of AVERROR_NOMEM with AVERROR(ENOMEM).
author | takis |
---|---|
date | Thu, 19 Jul 2007 15:21:30 +0000 |
parents | 2f0154760e5f |
children | b21c2af60bc9 |
comparison
equal
deleted
inserted
replaced
2272:8963d9ed1859 | 2273:7eb456c4ed8a |
---|---|
136 wsaud->audio_bits = (((header[10] & 0x2) >> 1) + 1) * 8; | 136 wsaud->audio_bits = (((header[10] & 0x2) >> 1) + 1) * 8; |
137 | 137 |
138 /* initialize the audio decoder stream */ | 138 /* initialize the audio decoder stream */ |
139 st = av_new_stream(s, 0); | 139 st = av_new_stream(s, 0); |
140 if (!st) | 140 if (!st) |
141 return AVERROR_NOMEM; | 141 return AVERROR(ENOMEM); |
142 av_set_pts_info(st, 33, 1, wsaud->audio_samplerate); | 142 av_set_pts_info(st, 33, 1, wsaud->audio_samplerate); |
143 st->codec->codec_type = CODEC_TYPE_AUDIO; | 143 st->codec->codec_type = CODEC_TYPE_AUDIO; |
144 st->codec->codec_id = wsaud->audio_type; | 144 st->codec->codec_id = wsaud->audio_type; |
145 st->codec->codec_tag = 0; /* no tag */ | 145 st->codec->codec_tag = 0; /* no tag */ |
146 st->codec->channels = wsaud->audio_channels; | 146 st->codec->channels = wsaud->audio_channels; |
221 unsigned int chunk_size; | 221 unsigned int chunk_size; |
222 | 222 |
223 /* initialize the video decoder stream */ | 223 /* initialize the video decoder stream */ |
224 st = av_new_stream(s, 0); | 224 st = av_new_stream(s, 0); |
225 if (!st) | 225 if (!st) |
226 return AVERROR_NOMEM; | 226 return AVERROR(ENOMEM); |
227 av_set_pts_info(st, 33, 1, VQA_FRAMERATE); | 227 av_set_pts_info(st, 33, 1, VQA_FRAMERATE); |
228 wsvqa->video_stream_index = st->index; | 228 wsvqa->video_stream_index = st->index; |
229 st->codec->codec_type = CODEC_TYPE_VIDEO; | 229 st->codec->codec_type = CODEC_TYPE_VIDEO; |
230 st->codec->codec_id = CODEC_ID_WS_VQA; | 230 st->codec->codec_id = CODEC_ID_WS_VQA; |
231 st->codec->codec_tag = 0; /* no fourcc */ | 231 st->codec->codec_tag = 0; /* no fourcc */ |
247 | 247 |
248 /* initialize the audio decoder stream for VQA v1 or nonzero samplerate */ | 248 /* initialize the audio decoder stream for VQA v1 or nonzero samplerate */ |
249 if (AV_RL16(&header[24]) || (AV_RL16(&header[0]) == 1 && AV_RL16(&header[2]) == 1)) { | 249 if (AV_RL16(&header[24]) || (AV_RL16(&header[0]) == 1 && AV_RL16(&header[2]) == 1)) { |
250 st = av_new_stream(s, 0); | 250 st = av_new_stream(s, 0); |
251 if (!st) | 251 if (!st) |
252 return AVERROR_NOMEM; | 252 return AVERROR(ENOMEM); |
253 av_set_pts_info(st, 33, 1, VQA_FRAMERATE); | 253 av_set_pts_info(st, 33, 1, VQA_FRAMERATE); |
254 st->codec->codec_type = CODEC_TYPE_AUDIO; | 254 st->codec->codec_type = CODEC_TYPE_AUDIO; |
255 if (AV_RL16(&header[0]) == 1) | 255 if (AV_RL16(&header[0]) == 1) |
256 st->codec->codec_id = CODEC_ID_WESTWOOD_SND1; | 256 st->codec->codec_id = CODEC_ID_WESTWOOD_SND1; |
257 else | 257 else |