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.
* commit '2eaa3663fda750dac66d41fe8541a8744d5563a4':
avplay: enable only when SDL 1.2 is found
Conflicts:
configure
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '354468fc12dcf93e7fb4af552e18906771913273':
avplay: switch to new refcounted frames API
avconv: convert to new refcounted AVFrame API
Conflicts:
cmdutils.c
ffmpeg.c
ffmpeg.h
ffplay.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
This helps us not to make bad decision (frame dropping, audio compensation)
right after seeking when we do not know yet the recent audio or video clock.
Signed-off-by: Marton Balint <cus@passwd.hu>
We are now using a pts based approach, libavutil/libavcodec should provide the
correct pts-es anyway. This also fixes an issue when seeking to a frame with a
pts set to zero.
Signed-off-by: Marton Balint <cus@passwd.hu>
We use a refresh loop which displays the frames and also does the polling for
pending events in a non-blocking way. If we know the required delay until the
next frame, then exactly that amount of sleeping will be done. After each
handled event we check if we have to display a frame which kind of makes
displaying the frame a high priority event.
This improves greatly the smoothness of the video output especially with 50fps
content.
Signed-off-by: Marton Balint <cus@passwd.hu>
* commit 'db0a943266be29ff0596872ebb418dfed75d00de':
avplay: apply the stream sample_aspect_ratio to decoded video frames
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* cus/stable:
ffplay: step to next frame if paused when seeking
ffplay: move up pause functions
ffplay: remember last window dimensions
ffplay: fix order of setting show_mode
ffplay: dynamically allocate audio buffer
Merged-by: Michael Niedermayer <michaelni@gmx.at>
After this change the dimensions of single image videos will be remembered when
coming back from full screen. The issue was mentioned in ticket #2174.
Signed-off-by: Marton Balint <cus@passwd.hu>
We simply remove the fixed length VideoState->audio_buf2 and use
the previously unused VideoState->audio_buf1.
Fixes ticket #2191.
Signed-off-by: Marton Balint <cus@passwd.hu>
Actually we just re-create the filters, since there is no way to flush them.
Fixes hangup with yadif filter on seeking forward caused by a filtered frame
with a pts before the seek.
Signed-off-by: Marton Balint <cus@passwd.hu>
Previously VideoPicture->skip was used for that, using videoq.serial enables us
to detect obsolete frames right after pushing flush_pkt to the packet queue, so
we don't have to wait for the decoder thread to pop the flush packet anymore.
This is good because until now a full video picture queue may have blocked the
decoder thread.
Signed-off-by: Marton Balint <cus@passwd.hu>
"que" sounds like a slang word to me. This commit renames a few
variables, fix the comments and the logging messages (sometimes along
with small other typo fixes).
If the XV image linesize was different from the width, SDL would create an
overlay wider than the actually requested one. This causes a greenish line on
the right, because the rightmost texel is blended with unset data. This patch
introduces a function which duplicates the rightmost texel to the unset space,
that way the blending will be done with duplicated border texels.
Signed-off-by: Marton Balint <cus@passwd.hu>
Set codec id in case another codec is forced on the context (e.g. when
the user specify the codec with -codec).
For example fix:
ffplay -vcodec pgmyuv -i "tests/vsynth1/%02d.pgm"
Fail with a meaningfull error message in case of bogus input.
Also the new options are more consistent with the rest of the tool
options, since it does not support generic stream specifiers.
* qatar/master:
avplay: Do not use removed av_get_int()
avconv: fix variable shadowing in configure_input_audio_filter()
Conflicts:
ffmpeg_filter.c
ffplay.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Now it should work for the timestamp based and the byte based case as well.
Also only update the external clock if the seeking was successful.
Signed-off-by: Marton Balint <cus@passwd.hu>
In timestamp based seeking we update the external clock to the seek target,
therefore we should use sane timestamps even if libavformat could handle
seeking before the start of the file.
Signed-off-by: Marton Balint <cus@passwd.hu>
Otherwise playing the video could be much slower than realtime if the system
can't decode or display the frames fast enough.
Signed-off-by: Marton Balint <cus@passwd.hu>
The real av_sync_type may be different to VideoState->av_sync_type, because the
required audio or video stream for audio or video clock may not be available.
We will use a function to query the real av_sync_type which is used for
determining the master clock.
Signed-off-by: Marton Balint <cus@passwd.hu>
The purpose of the serial field is to accompany the decoded data during the
decoding process to know if the decoded data belongs to the data stream after
the latest packet queue flush.
Signed-off-by: Marton Balint <cus@passwd.hu>
We now initalize the external clock to 0 and, we use the system clock to
regulate the timings of audio and video in external clock sync mode. We
recover from external clock sync loss, when the delay to external clock is
bigger than AV_NOSYNC_THRESHOLD.
Signed-off-by: Marton Balint <cus@passwd.hu>
* qatar/master:
ARM: fix Thumb PIC on Apple
nut: add do {} while (0) to GET_V
tiffenc: Check av_malloc() results.
tiffenc: Simplify pixel format setup using AVPixFmtDescriptor.
Use atexit() instead of defining a custom exit_program() interface.
msvc: Fix detection of VFW & Avisynth required libs
Conflicts:
ffmpeg.c
ffmpeg_opt.c
ffplay.c
ffprobe.c
ffserver.c
libavcodec/tiffenc.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
* commit '7751e4693dd10ec98c20fbd9887233b575034272':
ogg: check that the expected number of headers had been parsed
libx264: change default to closed gop to match x264cli
Use avcodec_free_frame() to free AVFrames.
lavf: use a malloced AVFrame in try_decode_frame().
lavc: add avcodec_free_frame().
lavc: ensure extended_data is set properly on decoding
lavc: initialize AVFrame.extended_data in avcodec_get_frame_defaults()
lavc: use av_mallocz to allocate AVFrames.
lavc: rename the argument of avcodec_alloc_frame/get_frame_defaults
Conflicts:
doc/APIchanges
doc/examples/decoding_encoding.c
libavcodec/utils.c
libavcodec/version.h
libavfilter/src_movie.c
libavformat/oggdec.c
libavformat/oggdec.h
libavformat/oggparsetheora.c
libavformat/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
A decoded and resampled audio frame may not fit in the current size which is
not handled by the current code causing out of order waveform displays or even
channel mixups. A todo is added because this part can certainly be improved to
consume less memory but work reliably for any frame size.
Signed-off-by: Marton Balint <cus@passwd.hu>