Also make sure that we only exit or restart the video if it is not paused and
if the picture queue is empty.
There is still room for improvement (filters may also buffer some frames), but
the patch fixes the most common use cases and ticket #2783 as well.
Signed-off-by: Marton Balint <cus@passwd.hu>
Theoretically using start_time should also work if seeking is available and we
could determine that the next packet after a flush packet is the first packet
of a stream, but I could not think of an easy and clean way to do that, that is
why I sticked to the no seeking available condition for now.
Fixes ticket #2647.
Signed-off-by: Marton Balint <cus@passwd.hu>
Previously we estimated the audio packet pts instead of the frame pts,
therefore it only worked within a single packet (containing multiple frames).
The new method works accross seperate audio packets as well and also handles
better the case if a decoder buffers several packets before outputting a
decoded frame.
Signed-off-by: Marton Balint <cus@passwd.hu>
Also use negative stream_index for signaling obsolete audio packets. Using the
size alone is not enough, because size is 0 for null packets as well.
Signed-off-by: Marton Balint <cus@passwd.hu>
Add function avfilter_graph_parse_ptr() and favor it in place of
avfilter_graph_parse(), which will be restored with the old/Libav
signature at the next bump.
If HAVE_INCOMPATIBLE_LIBAV_API is enabled it will use the
Libav-compatible signature for avfilter_graph_parse().
At the next major bump the current implementation of
avfilter_graph_parse() should be dropped in favor of the Libav/old
implementation.
Should address trac ticket #2672.
SDL surface pitch is 16bit, to avoid possible overflows, we limit the window
width to 16383. Fixes ticket #2428.
Signed-off-by: Marton Balint <cus@passwd.hu>
Showing A-V diff has no use if there is no audio and video stream, but showing
the audio or video clock difference to the master clock can be useful.
Signed-off-by: Marton Balint <cus@passwd.hu>
It was raised to 4 because of a theoretical issue, if we ensure that we do not
return from the display function without popping one picture from the queue,
then its OK to use the old size.
Signed-off-by: Marton Balint <cus@passwd.hu>
Requeue them after seeking and also after opening a video stream. Also don't
fill the video queue in case of an attached picture video stream since there
will be no more than one packet from that stream.
Signed-off-by: Marton Balint <cus@passwd.hu>
The corresponding codec options (skip_loop, skip_idct, skip_frame) can be
set in a more flexible way.
This technically causes a user interface break, but since the options
were not even documented and we just released a major version that should
not be a serious issue.