History

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.

Anton Khirnov committed 2 years ago

Commit 89969451 parent a9193f72 files · +3 −0Browse files

Unified · Split

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

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t