avformat/subtitles: use av_packet_alloc() to allocate packets
Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user