Skip to content
Permalink
Browse files

avformat/subtitles: use AVPacket.dts to store the "read order"

This will be useful to get a proper ReadOrder field for the text decoders.
  • Loading branch information
ubitux committed Nov 2, 2014
1 parent 013c3eb commit a7d1c5917c36b66f3bcdcaf369f12edbc3450e8e
Showing with 2 additions and 2 deletions.
  1. +2 −2 libavformat/subtitles.c
@@ -136,7 +136,8 @@ AVPacket *ff_subtitles_queue_insert(FFDemuxSubtitlesQueue *q,
if (av_new_packet(sub, len) < 0)
return NULL;
sub->flags |= AV_PKT_FLAG_KEY;
sub->pts = sub->dts = 0;
sub->pts = 0;
sub->dts = q->nb_subs - 1;
memcpy(sub->data, event, len);
}
return sub;
@@ -188,7 +189,6 @@ int ff_subtitles_queue_read_packet(FFDemuxSubtitlesQueue *q, AVPacket *pkt)
return AVERROR(ENOMEM);
}

pkt->dts = pkt->pts;
q->current_sub_idx++;
return 0;
}

0 comments on commit a7d1c59

Please sign in to comment.