Message ID | 20210804024136.72626-1-lq@chinaffmpeg.org |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] avformat/hls: return ret when read_packet get exceptions | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
Steven Liu (12021-08-04): > Subject: Re: [FFmpeg-devel] [PATCH] avformat/hls: return ret when read_packet > get exceptions Nit: FFmpeg does not have exceptions, it has error codes. Regards,
> 2021年8月4日 下午2:18,Nicolas George <george@nsup.org> 写道: > > Steven Liu (12021-08-04): >> Subject: Re: [FFmpeg-devel] [PATCH] avformat/hls: return ret when read_packet >> get exceptions > > Nit: FFmpeg does not have exceptions, it has error codes. Ok, "avformat/hls: return ret when read_packet return error codes." > > Regards, > > -- > Nicolas George > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". Thanks Steven Liu
Steven Liu (12021-08-04):
> Ok, "avformat/hls: return ret when read_packet return error codes."
"forward error code" is the idiomatic wording, according to git log.
Regards,
> 2021年8月4日 下午2:30,Nicolas George <george@nsup.org> 写道: > > Steven Liu (12021-08-04): >> Ok, "avformat/hls: return ret when read_packet return error codes." > > "forward error code" is the idiomatic wording, according to git log. What about “Return sensible error values and forward error codes.” ? > > Regards, > > -- > Nicolas George > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". Thanks Steven Liu
diff --git a/libavformat/hls.c b/libavformat/hls.c index 3c1b80f60c..21a939cef2 100644 --- a/libavformat/hls.c +++ b/libavformat/hls.c @@ -1461,7 +1461,7 @@ restart: reload: reload_count++; if (reload_count > c->max_reload) - return AVERROR_EOF; + return ret; if (!v->finished && av_gettime_relative() - v->last_load_time >= reload_interval) { if ((ret = parse_playlist(c, v->url, v, NULL)) < 0) { @@ -2283,7 +2283,7 @@ static int hls_read_packet(AVFormatContext *s, AVPacket *pkt) return 0; } - return AVERROR_EOF; + return ret; } static int hls_read_seek(AVFormatContext *s, int stream_index,