fftools/ffmpeg_mux: make OutputStream.pkt private

It is no longer used outside of muxing code.
This commit is contained in:
Anton Khirnov 2023-05-31 12:14:05 +02:00
parent 730a2221af
commit 141d11cb3c
4 changed files with 6 additions and 5 deletions

View File

@ -551,7 +551,6 @@ typedef struct OutputStream {
Encoder *enc;
AVCodecContext *enc_ctx;
AVPacket *pkt;
uint64_t nb_frames_dup;
uint64_t nb_frames_drop;

View File

@ -389,7 +389,7 @@ void of_streamcopy(OutputStream *ost, const AVPacket *pkt, int64_t dts)
MuxStream *ms = ms_from_ost(ost);
int64_t start_time = (of->start_time == AV_NOPTS_VALUE) ? 0 : of->start_time;
int64_t ost_tb_start_time = av_rescale_q(start_time, AV_TIME_BASE_Q, ost->mux_timebase);
AVPacket *opkt = ost->pkt;
AVPacket *opkt = ms->pkt;
av_packet_unref(opkt);
@ -862,7 +862,7 @@ static void ost_free(OutputStream **post)
av_bsf_free(&ms->bsf_ctx);
av_packet_free(&ms->bsf_pkt);
av_packet_free(&ost->pkt);
av_packet_free(&ms->pkt);
av_dict_free(&ost->encoder_opts);
av_freep(&ost->kf.pts);

View File

@ -46,6 +46,8 @@ typedef struct MuxStream {
AVBSFContext *bsf_ctx;
AVPacket *bsf_pkt;
AVPacket *pkt;
EncStats stats;
int64_t max_frames;

View File

@ -1064,8 +1064,8 @@ static OutputStream *ost_add(Muxer *mux, const OptionsContext *o,
else av_assert0(0);
av_log(ost, AV_LOG_VERBOSE, "\n");
ost->pkt = av_packet_alloc();
if (!ost->pkt)
ms->pkt = av_packet_alloc();
if (!ms->pkt)
report_and_exit(AVERROR(ENOMEM));
if (ost->enc_ctx) {