Files
FFmpeg/libavformat/network.c
Jun Zhao fe38a1e257 avformat/network: make ff_network_init() follow standard AVERROR convention
ff_network_init() used to return 0 on failure and 1 on success,
requiring callers to check !ff_network_init(). Change it to return
a negative AVERROR(EIO) on failure and 0 on success, matching the
standard FFmpeg convention where negative values indicate errors.

Update all callers (avio.c, rtsp.c, rtspdec.c, sapdec.c, sapenc.c,
utils.c) to use the standard (ret = ff_network_init()) < 0 pattern.

Signed-off-by: Jun Zhao <barryjzhao@tencent.com>
2026-07-12 00:02:40 +00:00

18 KiB