diff options
author | James Almer <jamrial@gmail.com> | 2021-02-03 20:55:27 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2021-03-17 15:19:36 -0300 |
commit | 98a776b5e32c3c7b535d34f9645757b242114d63 (patch) | |
tree | d422611f35f42a0922bbb198cb90973b9d721782 /libavformat/mpeg.c | |
parent | fd23efb20b701e5074cfaa6e9afc0e176c5e771a (diff) | |
download | ffmpeg-98a776b5e32c3c7b535d34f9645757b242114d63.tar.gz |
avformat/subtitles: use av_packet_alloc() to allocate packets
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/mpeg.c')
-rw-r--r-- | libavformat/mpeg.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/mpeg.c b/libavformat/mpeg.c index 20d1e10168..79610ec600 100644 --- a/libavformat/mpeg.c +++ b/libavformat/mpeg.c @@ -934,7 +934,7 @@ static int vobsub_read_packet(AVFormatContext *s, AVPacket *pkt) if (tmpq->current_sub_idx >= tmpq->nb_subs) continue; - ts = tmpq->subs[tmpq->current_sub_idx].pts; + ts = tmpq->subs[tmpq->current_sub_idx]->pts; if (ts < min_ts) { min_ts = ts; sid = i; @@ -950,7 +950,7 @@ static int vobsub_read_packet(AVFormatContext *s, AVPacket *pkt) /* compute maximum packet size using the next packet position. This is * useful when the len in the header is non-sense */ if (q->current_sub_idx < q->nb_subs) { - psize = q->subs[q->current_sub_idx].pos - pkt->pos; + psize = q->subs[q->current_sub_idx]->pos - pkt->pos; } else { int64_t fsize = avio_size(pb); psize = fsize < 0 ? 0xffff : fsize - pkt->pos; |