mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-03 13:32:10 +00:00
fftools/ffmpeg_enc: set AV_PKT_FLAG_TRUSTED on encoded packets
This allows using WRAPPED_AVFRAME encoders with loopback decoders in order to connect multiple filtergraphs together. Clear the flag in muxers, since lavf does not need it for anything and it would change the results of framecrc FATE tests.
This commit is contained in:
parent
a9193f7b7d
commit
8996945d45
@ -706,6 +706,8 @@ static int encode_frame(OutputFile *of, OutputStream *ost, AVFrame *frame,
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pkt->flags |= AV_PKT_FLAG_TRUSTED;
|
||||||
|
|
||||||
if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
|
if (enc->codec_type == AVMEDIA_TYPE_VIDEO) {
|
||||||
ret = update_video_stats(ost, pkt, !!vstats_filename);
|
ret = update_video_stats(ost, pkt, !!vstats_filename);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
@ -433,6 +433,7 @@ int muxer_thread(void *arg)
|
|||||||
|
|
||||||
ost = of->streams[mux->sch_stream_idx[stream_idx]];
|
ost = of->streams[mux->sch_stream_idx[stream_idx]];
|
||||||
mt.pkt->stream_index = ost->index;
|
mt.pkt->stream_index = ost->index;
|
||||||
|
mt.pkt->flags &= ~AV_PKT_FLAG_TRUSTED;
|
||||||
|
|
||||||
ret = mux_packet_filter(mux, &mt, ost, ret < 0 ? NULL : mt.pkt, &stream_eof);
|
ret = mux_packet_filter(mux, &mt, ost, ret < 0 ? NULL : mt.pkt, &stream_eof);
|
||||||
av_packet_unref(mt.pkt);
|
av_packet_unref(mt.pkt);
|
||||||
|
Loading…
Reference in New Issue
Block a user