Skip to content

Commit fb23b58

Browse files
authored
Merge pull request bilibili#5171 from bupt-steven/master
fix(las): exits when error occurs
2 parents a71b26b + 10856b9 commit fb23b58

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

ijkmedia/ijkplayer/ijkavformat/ijklas.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1405,16 +1405,17 @@ static int PlayList_read_thread(void* data) {
14051405
GopReader_close(gop_reader, playlist);
14061406
Representation* rep = playlist->adaptation_set.representations[new_index];
14071407
if (ff_check_interrupt(&s->interrupt_callback)) {
1408-
TagQueue_abort(&playlist->tag_queue);
14091408
break;
14101409
}
14111410
GopReader_init(gop_reader, rep, s, playlist);
14121411
ret = GopReader_download_gop(gop_reader, &playlist->multi_rate_adaption, playlist);
14131412
if (ret < 0) {
14141413
LasStatistic_on_rep_read_error(playlist->las_statistic, ret);
1414+
break;
14151415
}
14161416
}
14171417

1418+
TagQueue_abort(&playlist->tag_queue);
14181419
if (playlist->algo_thread) {
14191420
log_info("Signals algo_thread");
14201421
algo_cond_signal(playlist);
@@ -1891,7 +1892,7 @@ static int las_read_header(AVFormatContext* s) {
18911892

18921893
fail:
18931894
las_close(s);
1894-
return ret == 0 ? 0 : AVERROR_EOF;
1895+
return ret == 0 ? 0 : AVERROR_EXIT;
18951896
}
18961897

18971898
/*
@@ -2056,10 +2057,7 @@ static int las_read_packet(AVFormatContext* s, AVPacket* pkt) {
20562057
LasStatistic_on_read_packet(playlist->las_statistic, playlist);
20572058

20582059
fail:
2059-
if (ret != 0) {
2060-
log_error("ret:%s(0x%x), will return AVERROR_EOF", av_err2str(ret), ret);
2061-
}
2062-
return ret == 0 ? 0 : AVERROR_EOF;
2060+
return ret == 0 ? 0 : AVERROR_EXIT;
20632061
}
20642062

20652063
static int las_read_seek(AVFormatContext* s, int stream_index,

0 commit comments

Comments
 (0)