AVIOContext.error should be used directly instead.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
if (ret < 0) {
if (ret == AVERROR_EOF || ic->pb->eof_reached)
eof=1;
- if (url_ferror(ic->pb))
+ if (ic->pb->error)
break;
SDL_Delay(100); /* wait for user event */
continue;
* imply complete -EAGAIN handling support at random positions in
* the stream.
*/
- if (url_ferror(pb) == AVERROR(EAGAIN))
+ if (pb->error == AVERROR(EAGAIN))
return AVERROR(EAGAIN);
if (!pb->eof_reached)
av_log(s, AV_LOG_ERROR, "ff asf bad header %x at:%"PRId64"\n", c, avio_tell(pb));
* @deprecated use AVIOContext.eof_reached
*/
attribute_deprecated int url_feof(AVIOContext *s);
+attribute_deprecated int url_ferror(AVIOContext *s);
#endif
AVIOContext *avio_alloc_context(
*/
int64_t avio_size(AVIOContext *s);
-int url_ferror(AVIOContext *s);
-
int av_url_read_fpause(AVIOContext *h, int pause);
int64_t av_url_read_fseek(AVIOContext *h, int stream_index,
int64_t timestamp, int flags);
return 0;
return s->eof_reached;
}
-#endif
int url_ferror(AVIOContext *s)
{
return 0;
return s->error;
}
+#endif
void avio_wl32(AVIOContext *s, unsigned int val)
{
}
}
if (size1 == size) {
- if (url_ferror(s)) return url_ferror(s);
+ if (s->error) return s->error;
if (s->eof_reached) return AVERROR_EOF;
}
return size1 - size;
memcpy(buf, s->buf_ptr, len);
s->buf_ptr += len;
if (!len) {
- if (url_ferror(s)) return url_ferror(s);
+ if (s->error) return s->error;
if (s->eof_reached) return AVERROR_EOF;
}
return len;
hdr->video_frame_size = avio_rl32(pb);
hdr->audio_frame_size = avio_rl32(pb);
- if (pb->eof_reached || url_ferror(pb))
+ if (pb->eof_reached || pb->error)
return AVERROR(EIO);
if (avio_rl32(pb) != 0xAA55AA55)
uint8_t *startmarker_ptr, *end, *search_end, marker;
MXGContext *mxg = s->priv_data;
- while (!s->pb->eof_reached && !url_ferror(s->pb)){
+ while (!s->pb->eof_reached && !s->pb->error){
if (mxg->cache_size <= OVERREAD_SIZE) {
/* update internal buffer */
ret = mxg_update_cache(s, DEFAULT_PACKET_SIZE + OVERREAD_SIZE);
AVIOContext *pb = wf->pb_filesystem;
int nread = 0;
- if (wf->error || url_ferror(pb))
+ if (wf->error || pb->error)
return -1;
if (wf->position >= wf->length || pb->eof_reached)
return 0;