You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
lavf: move AVStream.last_in_packet_buffer to AVStreamInternal
Those are private fields, no reason to have them exposed in a public header.
This commit is contained in:
@@ -1079,13 +1079,9 @@ typedef struct AVStream {
|
|||||||
enum AVStreamParseType need_parsing;
|
enum AVStreamParseType need_parsing;
|
||||||
struct AVCodecParserContext *parser;
|
struct AVCodecParserContext *parser;
|
||||||
|
|
||||||
/**
|
|
||||||
* last packet in packet_buffer for this stream when muxing.
|
|
||||||
*/
|
|
||||||
struct AVPacketList *last_in_packet_buffer;
|
|
||||||
|
|
||||||
#if LIBAVFORMAT_VERSION_MAJOR < 59
|
#if LIBAVFORMAT_VERSION_MAJOR < 59
|
||||||
// kept for ABI compatibility only, do not access in any way
|
// kept for ABI compatibility only, do not access in any way
|
||||||
|
void *unused7;
|
||||||
AVProbeData unused6;
|
AVProbeData unused6;
|
||||||
int64_t unused5[16+1];
|
int64_t unused5[16+1];
|
||||||
void *unused2;
|
void *unused2;
|
||||||
|
@@ -338,6 +338,11 @@ struct AVStreamInternal {
|
|||||||
AVRational display_aspect_ratio;
|
AVRational display_aspect_ratio;
|
||||||
|
|
||||||
AVProbeData probe_data;
|
AVProbeData probe_data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* last packet in packet_buffer for this stream when muxing.
|
||||||
|
*/
|
||||||
|
struct AVPacketList *last_in_packet_buffer;
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
|
@@ -831,8 +831,8 @@ int ff_interleave_add_packet(AVFormatContext *s, AVPacket *pkt,
|
|||||||
av_packet_move_ref(&this_pktl->pkt, pkt);
|
av_packet_move_ref(&this_pktl->pkt, pkt);
|
||||||
pkt = &this_pktl->pkt;
|
pkt = &this_pktl->pkt;
|
||||||
|
|
||||||
if (st->last_in_packet_buffer) {
|
if (st->internal->last_in_packet_buffer) {
|
||||||
next_point = &(st->last_in_packet_buffer->next);
|
next_point = &(st->internal->last_in_packet_buffer->next);
|
||||||
} else {
|
} else {
|
||||||
next_point = &s->internal->packet_buffer;
|
next_point = &s->internal->packet_buffer;
|
||||||
}
|
}
|
||||||
@@ -876,7 +876,7 @@ next_non_null:
|
|||||||
|
|
||||||
this_pktl->next = *next_point;
|
this_pktl->next = *next_point;
|
||||||
|
|
||||||
st->last_in_packet_buffer = *next_point = this_pktl;
|
st->internal->last_in_packet_buffer = *next_point = this_pktl;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -926,7 +926,7 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < s->nb_streams; i++) {
|
for (i = 0; i < s->nb_streams; i++) {
|
||||||
if (s->streams[i]->last_in_packet_buffer) {
|
if (s->streams[i]->internal->last_in_packet_buffer) {
|
||||||
++stream_count;
|
++stream_count;
|
||||||
} else if (s->streams[i]->codecpar->codec_type != AVMEDIA_TYPE_ATTACHMENT &&
|
} else if (s->streams[i]->codecpar->codec_type != AVMEDIA_TYPE_ATTACHMENT &&
|
||||||
s->streams[i]->codecpar->codec_id != AV_CODEC_ID_VP8 &&
|
s->streams[i]->codecpar->codec_id != AV_CODEC_ID_VP8 &&
|
||||||
@@ -951,7 +951,7 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
|
|||||||
|
|
||||||
for (i = 0; i < s->nb_streams; i++) {
|
for (i = 0; i < s->nb_streams; i++) {
|
||||||
int64_t last_dts;
|
int64_t last_dts;
|
||||||
const AVPacketList *last = s->streams[i]->last_in_packet_buffer;
|
const AVPacketList *last = s->streams[i]->internal->last_in_packet_buffer;
|
||||||
|
|
||||||
if (!last)
|
if (!last)
|
||||||
continue;
|
continue;
|
||||||
@@ -1000,8 +1000,8 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
|
|||||||
if (!s->internal->packet_buffer)
|
if (!s->internal->packet_buffer)
|
||||||
s->internal->packet_buffer_end = NULL;
|
s->internal->packet_buffer_end = NULL;
|
||||||
|
|
||||||
if (st->last_in_packet_buffer == pktl)
|
if (st->internal->last_in_packet_buffer == pktl)
|
||||||
st->last_in_packet_buffer = NULL;
|
st->internal->last_in_packet_buffer = NULL;
|
||||||
|
|
||||||
av_packet_unref(&pktl->pkt);
|
av_packet_unref(&pktl->pkt);
|
||||||
av_freep(&pktl);
|
av_freep(&pktl);
|
||||||
@@ -1019,8 +1019,8 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *out,
|
|||||||
if (!s->internal->packet_buffer)
|
if (!s->internal->packet_buffer)
|
||||||
s->internal->packet_buffer_end = NULL;
|
s->internal->packet_buffer_end = NULL;
|
||||||
|
|
||||||
if (st->last_in_packet_buffer == pktl)
|
if (st->internal->last_in_packet_buffer == pktl)
|
||||||
st->last_in_packet_buffer = NULL;
|
st->internal->last_in_packet_buffer = NULL;
|
||||||
av_freep(&pktl);
|
av_freep(&pktl);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
|
@@ -3050,7 +3050,7 @@ static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket
|
|||||||
int i, stream_count = 0;
|
int i, stream_count = 0;
|
||||||
|
|
||||||
for (i = 0; i < s->nb_streams; i++)
|
for (i = 0; i < s->nb_streams; i++)
|
||||||
stream_count += !!s->streams[i]->last_in_packet_buffer;
|
stream_count += !!s->streams[i]->internal->last_in_packet_buffer;
|
||||||
|
|
||||||
if (stream_count && (s->nb_streams == stream_count || flush)) {
|
if (stream_count && (s->nb_streams == stream_count || flush)) {
|
||||||
AVPacketList *pktl = s->internal->packet_buffer;
|
AVPacketList *pktl = s->internal->packet_buffer;
|
||||||
@@ -3061,8 +3061,8 @@ static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket
|
|||||||
if (!stream_count || pktl->pkt.stream_index == 0)
|
if (!stream_count || pktl->pkt.stream_index == 0)
|
||||||
break;
|
break;
|
||||||
// update last packet in packet buffer
|
// update last packet in packet buffer
|
||||||
if (s->streams[pktl->pkt.stream_index]->last_in_packet_buffer != pktl)
|
if (s->streams[pktl->pkt.stream_index]->internal->last_in_packet_buffer != pktl)
|
||||||
s->streams[pktl->pkt.stream_index]->last_in_packet_buffer = pktl;
|
s->streams[pktl->pkt.stream_index]->internal->last_in_packet_buffer = pktl;
|
||||||
last = pktl;
|
last = pktl;
|
||||||
pktl = pktl->next;
|
pktl = pktl->next;
|
||||||
stream_count--;
|
stream_count--;
|
||||||
@@ -3087,8 +3087,8 @@ static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, AVPacket
|
|||||||
*out = pktl->pkt;
|
*out = pktl->pkt;
|
||||||
av_log(s, AV_LOG_TRACE, "out st:%d dts:%"PRId64"\n", (*out).stream_index, (*out).dts);
|
av_log(s, AV_LOG_TRACE, "out st:%d dts:%"PRId64"\n", (*out).stream_index, (*out).dts);
|
||||||
s->internal->packet_buffer = pktl->next;
|
s->internal->packet_buffer = pktl->next;
|
||||||
if(s->streams[pktl->pkt.stream_index]->last_in_packet_buffer == pktl)
|
if(s->streams[pktl->pkt.stream_index]->internal->last_in_packet_buffer == pktl)
|
||||||
s->streams[pktl->pkt.stream_index]->last_in_packet_buffer= NULL;
|
s->streams[pktl->pkt.stream_index]->internal->last_in_packet_buffer= NULL;
|
||||||
if(!s->internal->packet_buffer)
|
if(!s->internal->packet_buffer)
|
||||||
s->internal->packet_buffer_end= NULL;
|
s->internal->packet_buffer_end= NULL;
|
||||||
av_freep(&pktl);
|
av_freep(&pktl);
|
||||||
|
Reference in New Issue
Block a user