Mercurial > libavformat.hg
comparison raw.c @ 5245:30c093f11b4e libavformat
av_new_packet failing should return ENOMEM, not EIO.
author | reimar |
---|---|
date | Thu, 01 Oct 2009 16:10:09 +0000 |
parents | c872818a8e1f |
children | 3e401281ff93 |
comparison
equal
deleted
inserted
replaced
5244:8c0b5c6d0f17 | 5245:30c093f11b4e |
---|---|
140 int ret, size; | 140 int ret, size; |
141 | 141 |
142 size = RAW_PACKET_SIZE; | 142 size = RAW_PACKET_SIZE; |
143 | 143 |
144 if (av_new_packet(pkt, size) < 0) | 144 if (av_new_packet(pkt, size) < 0) |
145 return AVERROR(EIO); | 145 return AVERROR(ENOMEM); |
146 | 146 |
147 pkt->pos= url_ftell(s->pb); | 147 pkt->pos= url_ftell(s->pb); |
148 pkt->stream_index = 0; | 148 pkt->stream_index = 0; |
149 ret = get_partial_buffer(s->pb, pkt->data, size); | 149 ret = get_partial_buffer(s->pb, pkt->data, size); |
150 if (ret <= 0) { | 150 if (ret <= 0) { |
204 | 204 |
205 av_log(s, AV_LOG_DEBUG, "Ingenient packet: size=%d, width=%d, height=%d, unk1=%d unk2=%d\n", | 205 av_log(s, AV_LOG_DEBUG, "Ingenient packet: size=%d, width=%d, height=%d, unk1=%d unk2=%d\n", |
206 size, w, h, unk1, unk2); | 206 size, w, h, unk1, unk2); |
207 | 207 |
208 if (av_new_packet(pkt, size) < 0) | 208 if (av_new_packet(pkt, size) < 0) |
209 return AVERROR(EIO); | 209 return AVERROR(ENOMEM); |
210 | 210 |
211 pkt->pos = url_ftell(s->pb); | 211 pkt->pos = url_ftell(s->pb); |
212 pkt->stream_index = 0; | 212 pkt->stream_index = 0; |
213 ret = get_buffer(s->pb, pkt->data, size); | 213 ret = get_buffer(s->pb, pkt->data, size); |
214 if (ret <= 0) { | 214 if (ret <= 0) { |