avfilter_graph_free(&p);
});
- video_graph_->nb_threads = boost::thread::hardware_concurrency();
+ video_graph_->nb_threads = 0;
video_graph_->thread_type = AVFILTER_THREAD_SLICE;
const auto vsrc_options = (boost::format("video_size=%1%x%2%:pix_fmt=%3%:time_base=%4%/%5%:pixel_aspect=%6%/%7%:frame_rate=%8%/%9%")
sf::Window window_;
tbb::atomic<bool> polling_event_;
+ std::int64_t pts_;
spl::shared_ptr<diagnostics::graph> graph_;
caspar::timer perf_timer_;
: config_(config)
, format_desc_(format_desc)
, channel_index_(channel_index)
+ , pts_(0)
, sink_(sink)
, filter_([&]() -> ffmpeg::filter
{
sample_aspect_ratio,
AV_PIX_FMT_BGRA,
{ AV_PIX_FMT_BGRA },
- format_desc.field_mode == core::field_mode::progressive || !config.auto_deinterlace ? "" : "YADIF=1:-1");
+ format_desc.field_mode == core::field_mode::progressive || !config.auto_deinterlace ? "" : "format=pix_fmts=gbrp,YADIF=1:-1");
}())
{
if (format_desc_.format == core::video_format::ntsc && config_.aspect == configuration::aspect_ratio::aspect_4_3)
spl::shared_ptr<AVFrame> get_av_frame()
{
- spl::shared_ptr<AVFrame> av_frame(avcodec_alloc_frame(), av_free);
+ spl::shared_ptr<AVFrame> av_frame(av_frame_alloc(), [](AVFrame* p) { av_frame_free(&p); });
avcodec_get_frame_defaults(av_frame.get());
av_frame->linesize[0] = format_desc_.width*4;
av_frame->height = format_desc_.height;
av_frame->interlaced_frame = format_desc_.field_mode != core::field_mode::progressive;
av_frame->top_field_first = format_desc_.field_mode == core::field_mode::upper ? 1 : 0;
+ av_frame->pts = pts_++;
return av_frame;
}