<div dir="ltr"><div class="gmail_default" style="font-family:monospace;font-size:small">Hello everyone,<br>I'm currently on a quest to use hardware acceleration (specifically CUDA) every where I can on my player.</div><div class="gmail_default" style="font-family:monospace;font-size:small">So far, I'm able to decode using cuvid decoders and it's working great, but it fails when trying scale_npp filter (scale filter works fine).</div><div class="gmail_default" style="font-family:monospace;font-size:small">So for I narrowed down to nppscale_filter_frame processing an empty hw_frame_ctx form the passed AVFilterLink, so I know I'm lacking a proper hardware initialization for this filter, my problem is that I don't know where and how.</div><div class="gmail_default" style="font-family:monospace;font-size:small">I'm copying my code below (filter initialization and usage) in case anyone is able to give me a hand.</div><div class="gmail_default" style="font-family:monospace;font-size:small">Thanks.</div><div class="gmail_default" style="font-family:monospace;font-size:small"><br></div><div class="gmail_default" style="font-family:monospace;font-size:small">##filter initialization.</div><div class="gmail_default" style="font-family:monospace;font-size:small"><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(255,255,85)">char</span><span style="color:rgb(192,192,192)"> </span>args<span style="color:rgb(192,192,192)"> </span>[<span style="color:rgb(255,85,255)">512</span>];</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">int</span><span style="color:rgb(192,192,192)"> </span>ret<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">0</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">const</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,85)">AVFilter</span><span style="color:rgb(192,192,192)"> </span>*bufferSource<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>avfilter_get_by_name(<span style="color:rgb(255,85,255)">"buffer"</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">const</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,85)">AVFilter</span><span style="color:rgb(192,192,192)"> </span>*bufferSink<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>avfilter_get_by_name(<span style="color:rgb(255,85,255)">"buffersink"</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,85)">AVFilterInOut</span><span style="color:rgb(192,192,192)"> </span>*outputs=avfilter_inout_alloc();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,85)">AVFilterInOut</span><span style="color:rgb(192,192,192)"> </span>*inputs=avfilter_inout_alloc();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,85)">AVRational</span><span style="color:rgb(192,192,192)"> </span>time_base<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>m_ffmpeg<span style="color:rgb(170,170,170)">-></span>videoStream->time_base;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">enum</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,255,85)">AVPixelFormat</span><span style="color:rgb(192,192,192)"> </span>pix_fmts[]<span style="color:rgb(192,192,192)"> </span>=<span style="color:rgb(192,192,192)"> </span>{<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(85,255,85)">AV_PIX_FMT_YUV420P</span>,<span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(85,255,85)">AV_PIX_FMT_NONE</span><span style="color:rgb(192,192,192)"> </span>};</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>avFilterGraph<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">=</span><span style="color:rgb(192,192,192)"> </span>avfilter_graph_alloc();</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>snprintf(args,</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">sizeof</span><span style="color:rgb(192,192,192)"> </span>(args),</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">"video_size=%dx%d:pix_fmt=%d:time_base=%d/%d:pixel_aspect=%d/%d"</span>,</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>m_CodecCtx->width,</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>m_CodecCtx->height,</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(85,255,85)">AV_PIX_FMT_NV12</span>,</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>time_base.num,<span style="color:rgb(192,192,192)"> </span>time_base.den,</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>m_CodecCtx->sample_aspect_ratio.num,</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>m_CodecCtx->sample_aspect_ratio.den);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>ret<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">=</span><span style="color:rgb(192,192,192)"> </span>avfilter_graph_create_filter(<span style="color:rgb(170,170,170)">&</span>sourceContext,<span style="color:rgb(192,192,192)"> </span>bufferSource,</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">"in"</span>,<span style="color:rgb(192,192,192)"> </span>args,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">NULL</span>,<span style="color:rgb(192,192,192)"> </span>avFilterGraph);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">if</span>(ret<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)"><</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">0</span>){</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">Error</span>(<span style="color:rgb(255,85,255)">"avfilter:\tCannot</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">create</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">buffer</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">source"</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>avfilter_inout_free(<span style="color:rgb(170,170,170)">&</span>outputs);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>avfilter_inout_free(<span style="color:rgb(170,170,170)">&</span>inputs);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">return</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">false</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>ret<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">=</span><span style="color:rgb(192,192,192)"> </span>avfilter_graph_create_filter(<span style="color:rgb(170,170,170)">&</span>sinkContext,<span style="color:rgb(192,192,192)"> </span>bufferSink,</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">"out"</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">NULL</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">NULL</span>,<span style="color:rgb(192,192,192)"> </span>avFilterGraph);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">if</span>(ret<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)"><</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">0</span>){</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">Error</span>(<span style="color:rgb(255,85,255)">"avfilter:\tCannot</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">create</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">buffer</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">sink"</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>avfilter_inout_free(<span style="color:rgb(170,170,170)">&</span>outputs);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>avfilter_inout_free(<span style="color:rgb(170,170,170)">&</span>inputs);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">return</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">false</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>ret<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">av_opt_set_int_list</span>(sinkContext,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">"pix_fmts"</span>,<span style="color:rgb(192,192,192)"> </span>pix_fmts,</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="font-style:italic;color:rgb(85,255,85)">AV_PIX_FMT_NONE</span>,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">AV_OPT_SEARCH_CHILDREN</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">if</span>(ret<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)"><</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">0</span>){</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">Error</span>(<span style="color:rgb(255,85,255)">"avfilter:\tCannot</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">set</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">output</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">pixel</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">format"</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>avfilter_inout_free(<span style="color:rgb(170,170,170)">&</span>outputs);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>avfilter_inout_free(<span style="color:rgb(170,170,170)">&</span>inputs);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">return</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">false</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>outputs->name<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">=</span><span style="color:rgb(192,192,192)"> </span>av_strdup(<span style="color:rgb(255,85,255)">"in"</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>outputs->filter_ctx<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">=</span><span style="color:rgb(192,192,192)"> </span>sourceContext;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>outputs->pad_idx<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">0</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>outputs->next<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">NULL</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>inputs->name<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">=</span><span style="color:rgb(192,192,192)"> </span>av_strdup(<span style="color:rgb(255,85,255)">"out"</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>inputs->filter_ctx<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">=</span><span style="color:rgb(192,192,192)"> </span>sinkContext;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>inputs->pad_idx<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">0</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>inputs->next<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">=</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">NULL</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>ret<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">=</span><span style="color:rgb(192,192,192)"> </span>avfilter_graph_parse_ptr(avFilterGraph,<span style="color:rgb(192,192,192)"> </span>filters,</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">&</span>inputs,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">&</span>outputs,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">NULL</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">if</span>(ret<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)"><</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">0</span>){</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">Error</span>(<span style="color:rgb(255,85,255)">"avfilter:\tCannot</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">parse</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">filter</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">graph"</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>avfilter_inout_free(<span style="color:rgb(170,170,170)">&</span>outputs);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>avfilter_inout_free(<span style="color:rgb(170,170,170)">&</span>inputs);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">return</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">false</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>ret<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">=</span><span style="color:rgb(192,192,192)"> </span>avfilter_graph_config(avFilterGraph,<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">NULL</span>)<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)"><</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">0</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">if</span>(ret<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)"><</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">0</span>){</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">Error</span>(<span style="color:rgb(255,85,255)">"avfilter:\tCannot</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">config</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">filter</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">graph"</span>);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>avfilter_inout_free(<span style="color:rgb(170,170,170)">&</span>outputs);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>avfilter_inout_free(<span style="color:rgb(170,170,170)">&</span>inputs);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">return</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">false</span>;</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>}</pre>
<pre style="margin-top:0px;margin-bottom:0px"><br></pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>avfilter_inout_free(<span style="color:rgb(170,170,170)">&</span>outputs);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>avfilter_inout_free(<span style="color:rgb(170,170,170)">&</span>inputs);</pre>
<pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">return</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">true</span>;</pre><pre style="margin-top:0px;margin-bottom:0px"><br></pre><pre style="margin-top:0px;margin-bottom:0px">##apply filter to frame.<br></pre><pre style="margin-top:0px;margin-bottom:0px"><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">if</span>(m_frameBack->format<span style="color:rgb(170,170,170)">==</span><span style="font-style:italic;color:rgb(85,255,85)">AV_PIX_FMT_CUDA</span>){</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">if</span>(av_hwframe_transfer_data(m_frameSW,m_frameBack,<span style="color:rgb(255,85,255)">0</span>)<span style="color:rgb(170,170,170)"><</span><span style="color:rgb(255,85,255)">0</span>){</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">Error</span>(<span style="color:rgb(255,85,255)">"Error</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">downloading</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">frame</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">from</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">gpu</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">to</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">ram"</span>);</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>}</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>}</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>m_frameSW->pts<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)">=</span><span style="color:rgb(192,192,192)"> </span>m_frameSW->best_effort_timestamp;</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">if</span>(av_buffersrc_add_frame_flags(sourceContext,m_frameSW,<span style="font-style:italic;color:rgb(85,255,85)">AV_BUFFERSRC_FLAG_KEEP_REF</span>)<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)"><</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">0</span>){</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">Error</span>(<span style="color:rgb(255,85,255)">"avfilter:\tError</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">feeding</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">filtergraph"</span>);</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>}</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,255,85)">if</span>(av_buffersink_get_frame(sinkContext,<span style="color:rgb(192,192,192)"> </span>m_frameFront)<span style="color:rgb(192,192,192)"> </span><span style="color:rgb(170,170,170)"><</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">0</span>){</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(85,85,255)">Error</span>(<span style="color:rgb(255,85,255)">"avfilter:\tError</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">getting</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">frame</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">from</span><span style="color:rgb(192,192,192)"> </span><span style="color:rgb(255,85,255)">filtergraph"</span>);</pre><pre style="margin-top:0px;margin-bottom:0px"><span style="color:rgb(192,192,192)"> </span>}</pre></pre></div><div class="gmail_default" style="font-family:monospace;font-size:small"><br></div></div>