mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-17 20:17:55 +02:00
avformat/mux, mxfenc: Don't use sizeof(AVPacket)
This removes one of the last usages of sizeof(AVPacket) in the generic muxing code. Reviewed-by: Tomas Härdin <tjoppen@acc.umu.se> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
20b0d24c2f
commit
41457e536c
@ -1014,15 +1014,9 @@ int ff_interleave_packet_per_dts(AVFormatContext *s, AVPacket *pkt,
|
|||||||
AVStream *const st = s->streams[pktl->pkt.stream_index];
|
AVStream *const st = s->streams[pktl->pkt.stream_index];
|
||||||
FFStream *const sti = ffstream(st);
|
FFStream *const sti = ffstream(st);
|
||||||
|
|
||||||
*pkt = pktl->pkt;
|
|
||||||
|
|
||||||
si->packet_buffer = pktl->next;
|
|
||||||
if (!si->packet_buffer)
|
|
||||||
si->packet_buffer_end = NULL;
|
|
||||||
|
|
||||||
if (sti->last_in_packet_buffer == pktl)
|
if (sti->last_in_packet_buffer == pktl)
|
||||||
sti->last_in_packet_buffer = NULL;
|
sti->last_in_packet_buffer = NULL;
|
||||||
av_freep(&pktl);
|
avpriv_packet_list_get(&si->packet_buffer, &si->packet_buffer_end, pkt);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
|
@ -3128,14 +3128,10 @@ static int mxf_interleave_get_packet(AVFormatContext *s, AVPacket *out, int flus
|
|||||||
pktl = si->packet_buffer;
|
pktl = si->packet_buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
*out = pktl->pkt;
|
|
||||||
av_log(s, AV_LOG_TRACE, "out st:%d dts:%"PRId64"\n", (*out).stream_index, (*out).dts);
|
|
||||||
si->packet_buffer = pktl->next;
|
|
||||||
if (ffstream(s->streams[pktl->pkt.stream_index])->last_in_packet_buffer == pktl)
|
if (ffstream(s->streams[pktl->pkt.stream_index])->last_in_packet_buffer == pktl)
|
||||||
ffstream(s->streams[pktl->pkt.stream_index])->last_in_packet_buffer = NULL;
|
ffstream(s->streams[pktl->pkt.stream_index])->last_in_packet_buffer = NULL;
|
||||||
if (!si->packet_buffer)
|
avpriv_packet_list_get(&si->packet_buffer, &si->packet_buffer_end, out);
|
||||||
si->packet_buffer_end = NULL;
|
av_log(s, AV_LOG_TRACE, "out st:%d dts:%"PRId64"\n", out->stream_index, out->dts);
|
||||||
av_freep(&pktl);
|
|
||||||
return 1;
|
return 1;
|
||||||
} else {
|
} else {
|
||||||
out:
|
out:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user