Less than 0.04 sec delays should not be noticable, and it helps us with 50fps
content where some timing errors can cause a frame dup where it is not really
necessary.
Signed-off-by: Marton Balint <cus@passwd.hu>
After this commit applications needs to call av_format_inject_global_side_data()
or handle AVStream side data by some other means if they want it not to be lost.
This fixes a API incompatibility with libav.
libav API does not allow the data to be passed through AVPackets
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
When SDL could not allocate a YUV overlay or open a window, the video thread
got locked up because it waited for the allocation to finish forever.
Reported-by: Carl Eugen Hoyos <cehoyos@ag.or.at>
Signed-off-by: Marton Balint <cus@passwd.hu>
It was introduced in c2e8691c07, but since we no
longer no longer provide a custom get_buffer callback, the original cause of
the issue is gone.
Signed-off-by: Marton Balint <cus@passwd.hu>
It is no longer necessary. Also do frame timer and video current pos reset in
the main thread because with the wait removed, the timing would not be optimal
in the read thread.
Signed-off-by: Marton Balint <cus@passwd.hu>
Also do not update current pts on dropped frames, it is no longer necessary.
Fixes regression part of ticket #2507.
Signed-off-by: Marton Balint <cus@passwd.hu>
- consider it an invalid PTS when the next PTS value is the same as the current one
- in case of invalid or unknown PTS, return vp->duration
This fixes ffplay part of ticket #3005.
Signed-off-by: Marton Balint <cus@passwd.hu>
When changing the audio, video or subtitle stream, from now on, ffplay will
cycle through the streams of the current program.
Signed-off-by: Marton Balint <cus@passwd.hu>
This avoids future ABI issues when the field is moved to the end of the
struct.
Reviewed-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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.