1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-11-29 05:57:37 +02:00

fftools/ffmpeg: stop accessing the encoder context unnecessarily

The same information is available from AVStream.codecpar. This will
allow to stop allocating an encoder unless encoding is actually
performed.
This commit is contained in:
Anton Khirnov
2022-06-19 12:08:18 +02:00
parent 1ec1a48458
commit c2f2dd0296
2 changed files with 9 additions and 8 deletions

View File

@@ -201,7 +201,7 @@ static int write_packet(OutputFile *of, OutputStream *ost, AVPacket *pkt)
if (debug_ts) {
av_log(NULL, AV_LOG_INFO, "muxer <- type:%s "
"pkt_pts:%s pkt_pts_time:%s pkt_dts:%s pkt_dts_time:%s duration:%s duration_time:%s size:%d\n",
av_get_media_type_string(ost->enc_ctx->codec_type),
av_get_media_type_string(st->codecpar->codec_type),
av_ts2str(pkt->pts), av_ts2timestr(pkt->pts, &ost->st->time_base),
av_ts2str(pkt->dts), av_ts2timestr(pkt->dts, &ost->st->time_base),
av_ts2str(pkt->duration), av_ts2timestr(pkt->duration, &ost->st->time_base),