|
|
@ -782,7 +782,7 @@ static int read_gab2_sub(AVStream *st, AVPacket *pkt) { |
|
|
|
|
|
|
|
|
|
|
|
ast->sub_ctx->pb = pb; |
|
|
|
ast->sub_ctx->pb = pb; |
|
|
|
if (!avformat_open_input(&ast->sub_ctx, "", sub_demuxer, NULL)) { |
|
|
|
if (!avformat_open_input(&ast->sub_ctx, "", sub_demuxer, NULL)) { |
|
|
|
av_read_packet(ast->sub_ctx, &ast->sub_pkt); |
|
|
|
ff_read_packet(ast->sub_ctx, &ast->sub_pkt); |
|
|
|
*st->codec = *ast->sub_ctx->streams[0]->codec; |
|
|
|
*st->codec = *ast->sub_ctx->streams[0]->codec; |
|
|
|
ast->sub_ctx->streams[0]->codec->extradata = NULL; |
|
|
|
ast->sub_ctx->streams[0]->codec->extradata = NULL; |
|
|
|
time_base = ast->sub_ctx->streams[0]->time_base; |
|
|
|
time_base = ast->sub_ctx->streams[0]->time_base; |
|
|
@ -824,7 +824,7 @@ static AVStream *get_subtitle_pkt(AVFormatContext *s, AVStream *next_st, |
|
|
|
ast = sub_st->priv_data; |
|
|
|
ast = sub_st->priv_data; |
|
|
|
*pkt = ast->sub_pkt; |
|
|
|
*pkt = ast->sub_pkt; |
|
|
|
pkt->stream_index = sub_st->index; |
|
|
|
pkt->stream_index = sub_st->index; |
|
|
|
if (av_read_packet(ast->sub_ctx, &ast->sub_pkt) < 0) |
|
|
|
if (ff_read_packet(ast->sub_ctx, &ast->sub_pkt) < 0) |
|
|
|
ast->sub_pkt.data = NULL; |
|
|
|
ast->sub_pkt.data = NULL; |
|
|
|
} |
|
|
|
} |
|
|
|
return sub_st; |
|
|
|
return sub_st; |
|
|
@ -1268,7 +1268,7 @@ static void seek_subtitle(AVStream *st, AVStream *st2, int64_t timestamp) |
|
|
|
av_free_packet(&ast2->sub_pkt); |
|
|
|
av_free_packet(&ast2->sub_pkt); |
|
|
|
if (avformat_seek_file(ast2->sub_ctx, 0, INT64_MIN, ts2, ts2, 0) >= 0 || |
|
|
|
if (avformat_seek_file(ast2->sub_ctx, 0, INT64_MIN, ts2, ts2, 0) >= 0 || |
|
|
|
avformat_seek_file(ast2->sub_ctx, 0, ts2, ts2, INT64_MAX, 0) >= 0) |
|
|
|
avformat_seek_file(ast2->sub_ctx, 0, ts2, ts2, INT64_MAX, 0) >= 0) |
|
|
|
av_read_packet(ast2->sub_ctx, &ast2->sub_pkt); |
|
|
|
ff_read_packet(ast2->sub_ctx, &ast2->sub_pkt); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) |
|
|
|
static int avi_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags) |
|
|
|