The amv one probably looks suspicious, but since it's an intra-only
codec, I couldn't possibly imagine what it would use the edge for,
and the vsynth fate result doesn't change, so it's probably OK.
FFplay was using a 5 frame packet buffer, this is not much (e.g. 200 ms for
25fps video), when HLS is requesting a new segment via HTTP, it may take longer
for the request to complete.
Should fix ticket #4720.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
The windows SDL audio driver plays the old data in the buffer in a loop if it
is not updated in time. So instead of waiting for data and blocking the the
audio thread, return silence if no data is available.
Should fix ticket #2289.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Marton Balint <cus@passwd.hu>
Fixes some files from Ticket679
This also changes subtitles to 4:2:0 matching the output format and thus
simplifying the blend code.
This restricts placement to the chroma sample resolution though, speak up
if you consider this a problem, say so, the code could be changed to use
YUV444 for subtitles and scaling them down while blending, this would be
slower though.
The current code only uses a single swscale context and reinitializes it
as needed, this could be changed as well if needed
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This helps the user to see the available streams just before the error message
if the stream specifiers do not match.
Signed-off-by: Marton Balint <cus@passwd.hu>
On init failure, let's just free it, so next time it will be recreated from
start.
Also fixes Coverity CID 1241515.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
This is more robust and should avoid false positives in coverity
That is if the type is ever mixed up, after this patch that would
just be a null pointer dereference instead of a random possibly
out of array access
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
In some cases resize events can happen even during fullscreen, so let's pass
the proper flag to SDL_SetVideoMode.
Fixes ticket #3964.
Reported-by: Jeff Dwork <jeff@reggie.com>
Signed-off-by: Marton Balint <cus@passwd.hu>
Create a generic frame and a frame queue struct to handle video picture queues
and subtitle picture queues with common code. Also add the possibility to queue
AVFrames, however at the moment we only use SDL_Overlay buffers for video and
AVSubtitles for subtitles.
Signed-off-by: Marton Balint <cus@passwd.hu>
Since audio clock calculations are more accurate now, it is safe to decrease
the sync treshold to compensate the larger buffers caused by less frequent
audio callbacks.
Signed-off-by: Marton Balint <cus@passwd.hu>
Too many audio callbacks per second can cause buffer underruns especially under
load. As now we take into accound the elapsed time after an audio callback when
determining current audio clock, it is not that important to use small buffer
sizes and frequent audio callbacks, so lets remove the comment.
Signed-off-by: Marton Balint <cus@passwd.hu>
Instead of directly rolling back the frame queue, keep the last displayed
picture in the queue and use a boolean variable to keep track if it is
displayed or not. This makes the code cleaner because it removes the
complicated logic in pictq_prev_picture.
There should be no change in functionality.
Signed-off-by: Marton Balint <cus@passwd.hu>