summaryrefslogtreecommitdiff
path: root/libavformat/jvdec.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2020-10-09 09:22:36 +0200
committerAnton Khirnov <anton@khirnov.net>2020-10-28 14:59:28 +0100
commitcea7c19cda0ea1630ae1de8c102ab14231b9db10 (patch)
tree9e703af026f15d976d79a0811566043ccb95ec9f /libavformat/jvdec.c
parent7e87288f73242dac6344e65f892569102893fac0 (diff)
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/jvdec.c')
-rw-r--r--libavformat/jvdec.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/libavformat/jvdec.c b/libavformat/jvdec.c
index 551f8069e6..47d18e2beb 100644
--- a/libavformat/jvdec.c
+++ b/libavformat/jvdec.c
@@ -92,7 +92,7 @@ static int read_header(AVFormatContext *s)
vst->codecpar->height = avio_rl16(pb);
vst->duration =
vst->nb_frames =
- ast->nb_index_entries = avio_rl16(pb);
+ ast->internal->nb_index_entries = avio_rl16(pb);
avpriv_set_pts_info(vst, 64, avio_rl16(pb), 1000);
avio_skip(pb, 4);
@@ -107,19 +107,19 @@ static int read_header(AVFormatContext *s)
avio_skip(pb, 10);
- ast->index_entries = av_malloc(ast->nb_index_entries *
- sizeof(*ast->index_entries));
- if (!ast->index_entries)
+ ast->internal->index_entries = av_malloc(ast->internal->nb_index_entries *
+ sizeof(*ast->internal->index_entries));
+ if (!ast->internal->index_entries)
return AVERROR(ENOMEM);
- jv->frames = av_malloc(ast->nb_index_entries * sizeof(JVFrame));
+ jv->frames = av_malloc(ast->internal->nb_index_entries * sizeof(JVFrame));
if (!jv->frames) {
- av_freep(&ast->index_entries);
+ av_freep(&ast->internal->index_entries);
return AVERROR(ENOMEM);
}
- offset = 0x68 + ast->nb_index_entries * 16;
- for (i = 0; i < ast->nb_index_entries; i++) {
- AVIndexEntry *e = ast->index_entries + i;
+ offset = 0x68 + ast->internal->nb_index_entries * 16;
+ for (i = 0; i < ast->internal->nb_index_entries; i++) {
+ AVIndexEntry *e = ast->internal->index_entries + i;
JVFrame *jvf = jv->frames + i;
/* total frame size including audio, video, palette data and padding */
@@ -139,7 +139,7 @@ static int read_header(AVFormatContext *s)
if (s->error_recognition & AV_EF_EXPLODE) {
read_close(s);
av_freep(&jv->frames);
- av_freep(&ast->index_entries);
+ av_freep(&ast->internal->index_entries);
return AVERROR_INVALIDDATA;
}
jvf->audio_size =
@@ -170,8 +170,8 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
AVStream *ast = s->streams[0];
int ret;
- while (!avio_feof(s->pb) && jv->pts < ast->nb_index_entries) {
- const AVIndexEntry *e = ast->index_entries + jv->pts;
+ while (!avio_feof(s->pb) && jv->pts < ast->internal->nb_index_entries) {
+ const AVIndexEntry *e = ast->internal->index_entries + jv->pts;
const JVFrame *jvf = jv->frames + jv->pts;
switch (jv->state) {
@@ -244,9 +244,9 @@ static int read_seek(AVFormatContext *s, int stream_index,
return 0;
}
- if (i < 0 || i >= ast->nb_index_entries)
+ if (i < 0 || i >= ast->internal->nb_index_entries)
return 0;
- if (avio_seek(s->pb, ast->index_entries[i].pos, SEEK_SET) < 0)
+ if (avio_seek(s->pb, ast->internal->index_entries[i].pos, SEEK_SET) < 0)
return -1;
jv->state = JV_AUDIO;