avformat/aviobuf: End grace period of allowing 0 from read_packet

See a606f27f4c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
pull/362/head
Andreas Rheinhardt 4 years ago committed by James Almer
parent 7b6012efaa
commit 252500a78f
  1. 7
      libavformat/aviobuf.c
  2. 3
      libavformat/version.h

@ -519,14 +519,7 @@ static int read_packet_wrapper(AVIOContext *s, uint8_t *buf, int size)
if (!s->read_packet)
return AVERROR(EINVAL);
ret = s->read_packet(s->opaque, buf, size);
#if FF_API_OLD_AVIO_EOF_0
if (!ret && !s->max_packet_size) {
av_log(NULL, AV_LOG_WARNING, "Invalid return value 0 for stream protocol\n");
ret = AVERROR_EOF;
}
#else
av_assert2(ret || s->max_packet_size);
#endif
return ret;
}

@ -58,9 +58,6 @@
#ifndef FF_API_LAVF_AVCTX
#define FF_API_LAVF_AVCTX (LIBAVFORMAT_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_OLD_AVIO_EOF_0
#define FF_API_OLD_AVIO_EOF_0 (LIBAVFORMAT_VERSION_MAJOR < 59)
#endif
#ifndef FF_API_OLD_RTSP_OPTIONS
#define FF_API_OLD_RTSP_OPTIONS (LIBAVFORMAT_VERSION_MAJOR < 59)
#endif

Loading…
Cancel
Save