mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2025-10-17 14:24:26 +08:00
avcodec/packet_internal: make avpriv_packet_list_* functions use an internal struct
The next pointer is kept at the end for backwards compatability until the major bump, when it should ideally be moved at the front. Signed-off-by: James Almer <jamrial@gmail.com>
This commit is contained in:
@@ -812,7 +812,7 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
av_init_packet(pkt);
|
||||
|
||||
for (;;) {
|
||||
AVPacketList *pktl = s->internal->raw_packet_buffer;
|
||||
PacketList *pktl = s->internal->raw_packet_buffer;
|
||||
const AVPacket *pkt1;
|
||||
|
||||
if (pktl) {
|
||||
@@ -1020,7 +1020,7 @@ static int has_decode_delay_been_guessed(AVStream *st)
|
||||
return st->internal->nb_decoded_frames >= 20;
|
||||
}
|
||||
|
||||
static AVPacketList *get_next_pkt(AVFormatContext *s, AVStream *st, AVPacketList *pktl)
|
||||
static PacketList *get_next_pkt(AVFormatContext *s, AVStream *st, PacketList *pktl)
|
||||
{
|
||||
if (pktl->next)
|
||||
return pktl->next;
|
||||
@@ -1076,7 +1076,7 @@ static int64_t select_from_pts_buffer(AVStream *st, int64_t *pts_buffer, int64_t
|
||||
* of the packets in a window.
|
||||
*/
|
||||
static void update_dts_from_pts(AVFormatContext *s, int stream_index,
|
||||
AVPacketList *pkt_buffer)
|
||||
PacketList *pkt_buffer)
|
||||
{
|
||||
AVStream *st = s->streams[stream_index];
|
||||
int delay = st->internal->avctx->has_b_frames;
|
||||
@@ -1105,8 +1105,8 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index,
|
||||
int64_t dts, int64_t pts, AVPacket *pkt)
|
||||
{
|
||||
AVStream *st = s->streams[stream_index];
|
||||
AVPacketList *pktl = s->internal->packet_buffer ? s->internal->packet_buffer : s->internal->parse_queue;
|
||||
AVPacketList *pktl_it;
|
||||
PacketList *pktl = s->internal->packet_buffer ? s->internal->packet_buffer : s->internal->parse_queue;
|
||||
PacketList *pktl_it;
|
||||
|
||||
uint64_t shift;
|
||||
|
||||
@@ -1157,7 +1157,7 @@ static void update_initial_timestamps(AVFormatContext *s, int stream_index,
|
||||
static void update_initial_durations(AVFormatContext *s, AVStream *st,
|
||||
int stream_index, int64_t duration)
|
||||
{
|
||||
AVPacketList *pktl = s->internal->packet_buffer ? s->internal->packet_buffer : s->internal->parse_queue;
|
||||
PacketList *pktl = s->internal->packet_buffer ? s->internal->packet_buffer : s->internal->parse_queue;
|
||||
int64_t cur_dts = RELATIVE_TS_BASE;
|
||||
|
||||
if (st->first_dts != AV_NOPTS_VALUE) {
|
||||
@@ -1742,7 +1742,7 @@ int av_read_frame(AVFormatContext *s, AVPacket *pkt)
|
||||
}
|
||||
|
||||
for (;;) {
|
||||
AVPacketList *pktl = s->internal->packet_buffer;
|
||||
PacketList *pktl = s->internal->packet_buffer;
|
||||
|
||||
if (pktl) {
|
||||
AVPacket *next_pkt = &pktl->pkt;
|
||||
|
Reference in New Issue
Block a user