When an OSD message printed to the terminal was multiple lines, the
second line overwrote the status line. If that second line was shorter
than the status line, awkward looking remains of the status line were
left on the terminal.
Fix this by writing an empty status line before printing the OSD
message. This will clear the status line text.
Also, print the status line again after the OSD message is printed -
this makes output consistent with the single-line OSD message case.
Remaining caveat: only the last line of a multiline OSD message is
cleared when the OSD message is removed. But this is probably fine.
If block_align was 0, demux_lavf changed it to 1. This breaks at least
decoding of IMA ADPCM in LVF. Pass it through without changing instead.
(nBlockAlign as set in demux_lavf is put back into lavc's block_align
in ad_ffmpeg.)
This reverts 296f360f82. This commit gives no explanation why it does
things the way it does. But since nothing in mpv uses nBlockAlign
anymore except ad_ffmpeg, this is probably safe.
mplayer (and all forks) use a single FourCC field to map codecs. This is
what sh_video->format and sh_audio->format is used for. Basically it's a
key into the codecs.conf table to find out what decoder to use. (There's
only one video codec and one major audio codec left - both libavcodec.
But we still have to deal with mapping coming from non-libavformat
demuxers.)
It seems this causes some video codecs to fail, such as WV1F in AVI [1].
demux_lavf generally throws away the codec_tag from libavformat if the
codec is MPEG-in-AVI. There are probably other cases like this. Add a
hack to enforce passing the correct codec tag when only ffmpeg demuxers
and decoders involved.
Note: the sample [1] needs to be flipped. With --demuxer=avi, this is
done correctly, because unlike demux_lavf, the demuxer uses the FourCC
directly for the sh_video->format tag, and finds the correct codecs.conf
entry (which contains the flip flag). We could just add a "whitelist" of
codec tags which can be passed through to sh_video->format, but I don't
want to do that just for such an obscure format as the sample at hand.
Note 2: when demux_lavf is used, the AVCodecContext could be passed
directly to vd_ffmpeg/ad_ffmpeg. The code to convert to/from the
internal mplayer stream headers is probably still needed, as there are
non-ffmpeg demuxers and audio decoders.
[1] http://samples.mplayerhq.hu/V-codecs/WV1F/AVI/title2.avi
libavutil: for av_get_packed_sample_fmt()
libavcodec: for avcodec_encode_video2()
It's actually untested whether these are really the minimum required
versions. I didn't want to bump them further yet.
The "deinterlace" property was stuck at "no" if there wasn't actually
any switchable deinterlacer (like yadif or vdpau) in the video chain.
Also, take care of returning only 0/1 values. It appears yadif and vdpau
return their current deinterlacer mode, which is not always the value 0
or 1.
The -ni option does something with the AVI demuxer only.
Also fix misleading error messages when the packet queue overflows (it
suggests using -ni, which in the typical case of playing NI AVI files
will not work, as demux_lavf is used by default).
Use mp_asprintf in make_noauth_url and make_http_proxy_url.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32971 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: cboesch
Conflicts:
stream/url.c
Note: the mp_asprintf() function was introduced in r32970, and put
into its own files. We just put that directly into url.c, as we use
talloc_asprintf() in general, and mp_asprintf() is for url.c code only.
(Making url.c use talloc would probably result in a big mess.)
Make proxy and url parameter const in get_noauth_url and get_http_proxy_url.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@32972 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: cboesch
Fix check for empty log file (n contains a start offset of 15).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35269 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
Add missing ().
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35270 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
Conflicts:
libmpcodecs/vf_down3dright.c
Add comment to silence coverity (and it generally doesn't
hurt to make intentional fallthrough cases explicit).
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35271 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
Make uninit function handle vf->priv being NULL.
This happens in the case where memory allocation for it fails.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35272 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
Remove useless variable.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35273 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
Conflicts:
libmpcodecs/vf_softpulldown.c
Add new stream control command STREAM_CTRL_GET_CURRENT_TITLE for DVDs.
This provides the current title (aka track) number of a DVD.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35263 b3059339-0415-0410-9bf9-f77b7e298cf2
Allow STREAM_CTRL_GET_NUM_TITLES with cache enabled.
This is missing in r34474.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35258 b3059339-0415-0410-9bf9-f77b7e298cf2
Fix reading language from teletext descriptor when it is not
the first descriptor in the block.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35198 b3059339-0415-0410-9bf9-f77b7e298cf2
Remove "inline" from functions that are definitely not
absolutely critical for performance.
The compiler should be able to make a more intelligent
decision on its own.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35197 b3059339-0415-0410-9bf9-f77b7e298cf2
Avoid sleeping 0 ms, this can cause sleep to be not called at all.
This will then cause long hangs e.g. when sleeping on single-CPU/core computers.
Should fix bug #2084.
Patch suggested by Visenri [visenri yahoo es]
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35119 b3059339-0415-0410-9bf9-f77b7e298cf2
Support subrip format subtitles.
Patch by Philip Langdale [philipl overt org].
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35118 b3059339-0415-0410-9bf9-f77b7e298cf2
Conflicts:
libmpdemux/demux_lavf.c
When switching programs select subtitle stream regardless of
whether the format is text, ASS, bitmap or whatever.
There probably was some good reason for the condition but
it got lost in time and special-casing CODEC_ID_TEXT over other
test-based subtitles doesn't seem to make much sense.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35117 b3059339-0415-0410-9bf9-f77b7e298cf2
Conflicts:
libmpdemux/demux_lavf.c
Explicitly signal EOF when reaching the end of a file/pipe.
Fixes a 4 second delay due to stream_reconnect for e.g.
echo | mplayer -
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35112 b3059339-0415-0410-9bf9-f77b7e298cf2
Make compiler give the ana_coeff array automatically the right size.
Makes adding more colour schemes easier.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35078 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
Convert comments into designated initializers.
That is a simple way to ensure they always correspond
to what the compiler actually does.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35079 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
Add another anaglyph color variant.
Patch by Bob [mpbob ezpi net].
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35080 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
Remove outdated code that instead of preventing now causes crashes.
The problem it was trying to catch (next filter not supporting slices)
was fixed already in r10141 (by implementing a fallback version
of vf_next_draw_slice).
This should fix Debian Bug#683907.
Example command-line:
mencoder big_buck_bunny_480p_stereo.avi -o a.mpg -vf crop=346:240:2:24 -oac copy -ovc lavc
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35061 b3059339-0415-0410-9bf9-f77b7e298cf2
Author: reimar
Conflicts:
libmpcodecs/vf_expand.c
Code parsing the optional user/password part for some URL types given
as files to play, such as "ftp://user:password@host/filename", was
broken. Fix. I guess this isn't used much as nobody reported it
earlier.
af_scaletempo kept outdated values in the af->delay field after
reconfiguration until some audio was fed through the filter. This
could affect audio sync code after a playback speed change.
Additionally, in the special case speed=1 the code did not set the
af->mul field at all. Initialize both fields after reconfiguration.
Make stream_ffmpeg handle rtsp:// URLs by default, without requiring
ffmpeg://rtsp://. Previously (after removal of other rtsp
implementations) rtsp:// fell back to using HTTP, which was unlikely
to work.
Also add lavf:// as an alternative to ffmpeg:// to force the stream
implementation. Since libavformat can come from Libav rather than
FFmpeg, using the ffmpeg name in the prefix is misleading.
Note that this also adds a RGB colorspace for general symmetry. The
frontend (colormatrix property and options) and
mp_get_yuv2rgb_coeffs() don't support this.
Mostly pedantic bikeshedding issues.
Move some code around, so that the sub_bitmap_to_mp_images() function
can be split into two parts. This is better than having a big function
with many input and outputs, of which only half are used in each code
path.
Also, try to make code simpler by using a mp_rect type.
This guarantees that only subtitles are drawn. (Before this change, we
relied on the fact that OSD is only visible on user interaction, or if
explicitly request with --osd-level.)