On 08/04/2017 03:32 PM, Mark Thompson wrote:
On 04/08/17 14:06, Jorge Ramirez wrote:
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.
There should be some way to detect it from the decoder, I think?  (I don't 
actually know how this works in V4L2.)

To compare, if you look at MMAL (perhaps the most similar API in current lavc) there 
is a special FORMAT_CHANGED return when dequeuing a frame, and the decoder is 
reconfigured with new buffers when that 
happens:<http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/mmaldec.c;h=0b1195dc3e6f09beb74e3e47404456114596c499;hb=HEAD#l713>.


great, thanks for that.
The issue I have is that the V4L2 driver I am using to test - yes this needs to be detected by the decoder- has not implemented the feature yet. Will keep it in mind before sending the last series of the patchset.

also, I have rewritten the patchset to add clarity and clean some of the sedimentation from testing/hacking. is it ok with you if I post v4 now? it will simplify the discussion - the driver now much easier to follow.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to