diff options
author | Anton Khirnov <anton@khirnov.net> | 2020-10-09 09:22:36 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2020-10-28 14:59:28 +0100 |
commit | cea7c19cda0ea1630ae1de8c102ab14231b9db10 (patch) | |
tree | 9e703af026f15d976d79a0811566043ccb95ec9f /libavformat/mlvdec.c | |
parent | 7e87288f73242dac6344e65f892569102893fac0 (diff) | |
download | ffmpeg-cea7c19cda0ea1630ae1de8c102ab14231b9db10.tar.gz |
lavf: move AVStream.*index_entries* to AVStreamInternal
Those are private fields, no reason to have them exposed in a public
header. Since there are some (semi-)public fields located after these,
even though this section is supposed to be private, keep some dummy
padding there until the next major bump to preserve ABI compatibility.
Diffstat (limited to 'libavformat/mlvdec.c')
-rw-r--r-- | libavformat/mlvdec.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavformat/mlvdec.c b/libavformat/mlvdec.c index f08aabf4e0..1ddef3461e 100644 --- a/libavformat/mlvdec.c +++ b/libavformat/mlvdec.c @@ -191,12 +191,12 @@ static int scan_file(AVFormatContext *avctx, AVStream *vst, AVStream *ast, int f } } else if (vst && type == MKTAG('V', 'I', 'D', 'F') && size >= 4) { uint64_t pts = avio_rl32(pb); - ff_add_index_entry(&vst->index_entries, &vst->nb_index_entries, &vst->index_entries_allocated_size, + ff_add_index_entry(&vst->internal->index_entries, &vst->internal->nb_index_entries, &vst->internal->index_entries_allocated_size, avio_tell(pb) - 20, pts, file, 0, AVINDEX_KEYFRAME); size -= 4; } else if (ast && type == MKTAG('A', 'U', 'D', 'F') && size >= 4) { uint64_t pts = avio_rl32(pb); - ff_add_index_entry(&ast->index_entries, &ast->nb_index_entries, &ast->index_entries_allocated_size, + ff_add_index_entry(&ast->internal->index_entries, &ast->internal->nb_index_entries, &ast->internal->index_entries_allocated_size, avio_tell(pb) - 20, pts, file, 0, AVINDEX_KEYFRAME); size -= 4; } else if (vst && type == MKTAG('W','B','A','L') && size >= 28) { @@ -374,22 +374,22 @@ static int read_header(AVFormatContext *avctx) } if (vst) - vst->duration = vst->nb_index_entries; + vst->duration = vst->internal->nb_index_entries; if (ast) - ast->duration = ast->nb_index_entries; + ast->duration = ast->internal->nb_index_entries; - if ((vst && !vst->nb_index_entries) || (ast && !ast->nb_index_entries)) { + if ((vst && !vst->internal->nb_index_entries) || (ast && !ast->internal->nb_index_entries)) { av_log(avctx, AV_LOG_ERROR, "no index entries found\n"); read_close(avctx); return AVERROR_INVALIDDATA; } if (vst && ast) - avio_seek(pb, FFMIN(vst->index_entries[0].pos, ast->index_entries[0].pos), SEEK_SET); + avio_seek(pb, FFMIN(vst->internal->index_entries[0].pos, ast->internal->index_entries[0].pos), SEEK_SET); else if (vst) - avio_seek(pb, vst->index_entries[0].pos, SEEK_SET); + avio_seek(pb, vst->internal->index_entries[0].pos, SEEK_SET); else if (ast) - avio_seek(pb, ast->index_entries[0].pos, SEEK_SET); + avio_seek(pb, ast->internal->index_entries[0].pos, SEEK_SET); return 0; } @@ -415,12 +415,12 @@ static int read_packet(AVFormatContext *avctx, AVPacket *pkt) return AVERROR(EIO); } - pb = mlv->pb[st->index_entries[index].size]; + pb = mlv->pb[st->internal->index_entries[index].size]; if (!pb) { ret = FFERROR_REDO; goto next_packet; } - avio_seek(pb, st->index_entries[index].pos, SEEK_SET); + avio_seek(pb, st->internal->index_entries[index].pos, SEEK_SET); avio_skip(pb, 4); // blockType size = avio_rl32(pb); |