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.
Unified · Split
| @@ -706,6 +706,8 @@ static int encode_frame(OutputFile *of, OutputStream *ost, AVFrame *frame, · 705 unmodified lines | ||
| 706 | 706 | return ret; |
| 707 | 707 | } |
| 708 | 708 | |
| 709 | + pkt->flags |= AV_PKT_FLAG_TRUSTED; | |
| 710 | + | |
| 709 | 711 | if (enc->codec_type == AVMEDIA_TYPE_VIDEO) { |
| 710 | 712 | ret = update_video_stats(ost, pkt, !!vstats_filename); |
| 711 | 713 | if (ret < 0) |
| @@ -433,6 +433,7 @@ int muxer_thread(void *arg) · 432 unmodified lines | ||
| 433 | 433 | |
| 434 | 434 | ost = of->streams[mux->sch_stream_idx[stream_idx]]; |
| 435 | 435 | mt.pkt->stream_index = ost->index; |
| 436 | + mt.pkt->flags &= ~AV_PKT_FLAG_TRUSTED; | |
| 436 | 437 | |
| 437 | 438 | ret = mux_packet_filter(mux, &mt, ost, ret < 0 ? NULL : mt.pkt, &stream_eof); |
| 438 | 439 | av_packet_unref(mt.pkt); |