On 08/04/2017 01:51 PM, Mark Thompson wrote:
+    if (ret)
+        return 0;
+
+    return avpriv_v4l_dequeue(cap_pool, frame, NULL, timeout);
+}
What happens to the decoder if some parameters like resolution change 
mid-stream?  (Try the stream h264/reinit-large_420_8-to-small_420_8.h264 in the 
fate samples.)

yes, it breaks - the player still shows and image but it is corrupted.
I am not sure how to handle this situation to be honest...so need to look into this.


Also, are the frames returned here actually still used by the decoder 
internally as reference frames, or is the reference frame copied somewhere else?

I think once the buffers are dequeued, the v4l2 decoder doesnt keep any references to it.
  (Seems slightly unlikely that they would be copied given the additional 
memory requirements, but I know discrete desktop GPUs (which admittedly have 
9001x the memory bandwidth and power budget) do do this to hide the possible 
issues.)  I think, though I'm not entirely sure because I haven't run it, that 
the returned buffers will only have the user reference, so will appear to be 
writable to following filters - if that ends up writing on reference frames 
then the decoder will break.

ack

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to