Commit Graph

1088 Commits

Author SHA1 Message Date
reimar a4e62de5dc stream: make stream_read_line() terminate line on EOF
Make sure we return an "empty" line on eof, to make sure we get
no buffer overflows in case some code fails to check the return value.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31999 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:49 +02:00
reimar 112d8dd2fd stream_file: Simplify and document MinGW stdin hack
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31964 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:48 +02:00
reimar e2d5a13f76 stream_dvd[nav]: Add const qualifiers to string arguments
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31957 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:48 +02:00
reimar a62d145bdf Simplify code: make open_stream() accept NULL file_format argument
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31952 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:48 +02:00
diego 26541aeb8b printf format fixes ("%d" -> "%zd")
Add 'z' length modifier to %d printf format specifier for size_t argument.
stream/http.c:675: warning: format '%d' expects type 'int', but argument 4 has type 'size_t'

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31933 b3059339-0415-0410-9bf9-f77b7e298cf2

Add 'z' length modifier to %d printf format specifiers for size_t arguments.
libmpdemux/demux_avi.c:553: warning: format '%u' expects type 'unsigned int', but argument 5 has type 'size_t'
libmpdemux/demux_avi.c:553: warning: format '%u' expects type 'unsigned int', but argument 7 has type 'size_t'

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31935 b3059339-0415-0410-9bf9-f77b7e298cf2

Add 'z' length modifier to %d printf format specifiers for size_t arguments.
libmpdemux/demux_lmlm4.c:75: warning: format '%d' expects type 'int', but argument 5 has type 'ssize_t'
libmpdemux/demux_lmlm4.c:163: warning: format '%d' expects type 'int', but argument 6 has type 'ssize_t'
libmpdemux/demux_lmlm4.c:163: warning: format '%d' expects type 'int', but argument 7 has type 'ssize_t'

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31937 b3059339-0415-0410-9bf9-f77b7e298cf2

Add 'z' length modifier to %d printf format specifier for size_t argument.
stream/asf_streaming.c:676: warning: format '%d' expects type 'int', but argument 5 has type 'size_t'

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31938 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:48 +02:00
reimar 837b6d245d cache: add sanity-check for sector size
Add sanity-check for sector size to avoid strange crashes if it is
too large.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31914 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:34 +02:00
siretart 2e6ff523dd spelling fixes
Found by the Debian QA tool 'lintian'

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31913 b3059339-0415-0410-9bf9-f77b7e298cf2

reintroduce typo in genres.h that was fixed fixed r31913 to match the id3v2 spec

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31920 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:03 +02:00
reimar 848610a002 cache: Don't mess up current position if time-based seek fails
Avoid STREAM_CTRL_SEEK_TO_TIME messing up the current position for stream
types which do not support it.
Fixes seeking in local flv files.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31907 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:01 +02:00
diego 5c76f24b09 stream_dvd: Improve seeking by position
The current code takes the angle into account. This is a mistake since
the position is independent of the angle.

patch by Olivier Rolland, billl users.sourceforge net

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31895 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:01 +02:00
diego 0a321e01e3 stream_dvd: Improve seeking by chapters
The current code seeks to the start of the chapter. From this
position, it then tries to figure out the starting cell. This is
completely suboptimal and error prone since the starting cell can be
directly deduced from the chapter.

patch by Olivier Rolland, billl users.sourceforge net

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31894 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:01 +02:00
diego fdb6ce15df stream_dvd: fix incorrect assumption about chapter count
Fix the incorrect assumption that the number of chapters of a DVD
title is equal to the number of cells.

patch by Olivier Rolland, billl users.sourceforge net

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31893 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:15:01 +02:00
diego da1135a96d stream_dvb.c: avoid compiler warning by adding initialization
Initialize conf_file variable to kill the warning:
stream/stream_dvb.c:755: warning: 'conf_file' may be used uninitialized in this function
Blessed and suggested by Nico Sabbi.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31877 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:46 +02:00
diego 578ad534b3 configure: Rename "network" variable and option to "networking"
This avoids conflicts with the FFmpeg variable of the same name.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31749 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:44 +02:00
reimar 5544c07aab cache: Use sigaction() instead of signal()
Signal() has an unavoidable race-condition on "broken by
backwards-compatibility" systems like Solaris. (Upon receiving a
signal, the handler is reset to SIG_DFL, thus a second signal will
kill the process. The problem could also be reduced by re-installing
the handler inside the handler, but there's still a race-condition and
the risk of the handler being called inside the handler).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31738 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:44 +02:00
reimar 8200a8d532 stream.c: add <libavutil/common.h> include needed for GET_UTF16
Patch by Erik Auerswald {auerswal unix-ag.uni-kl.de}

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31658 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:35 +02:00
ben 4662ea6409 stream_bluray: implement slave mode compatible controls
Added stream controls: get/set for chapters and angles.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31640 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:20 +02:00
ben 6704008a46 stream_bluray: add unencrypted Blu-ray playback
Support for unencrypted Blu-ray playback through libbluray.
Use it through: mplayer br:////path/to/disc

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31631 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:14:20 +02:00
diego a1b8092c87 Factorize MPlayer/MEncoder version string handling.
The string now resides in a central object file instead of
being duplicated in every file that requires a version string.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31577 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:43 +02:00
reimar 41d25ebcc8 stream: Use MSG_NOSIGNAL flag if available for send().
This avoids MPlayer quitting due to SIGPIPE at least for these cases.
Ignoring SIGPIPE in general would break window-closing with some
window-managers.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31566 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:43 +02:00
diego 262dde35ff stream/dvbin.h: Use angular brackets for system #includes.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31516 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:07 +02:00
diego 322fecd8de stream_cddb: move structs to the file they're used in
Move cddb_data_t and cd_toc_t structs to the only place they are used.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31514 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:07 +02:00
diego 5a9c26af59 stream_cdda: change printf format for cdda_tracks to %d
Adjust printf length modifier, fixes the warning:
stream/stream_cdda.c:358: warning: format '%ld' expects type 'long int', but argument 4 has type 'int'

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31512 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:07 +02:00
diego 899caa91f1 stream_cdda.c: Reorder functions to avoid forward declarations.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31511 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:07 +02:00
diego f07956632e stream_cdd*: Move declarations for stream_cddb.c functions to cdd.h
This fixes a bunch of warnings about missing function prototypes.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31509 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:07 +02:00
diego 5be8d4d633 stream_cddb: Remove unused static functions
Remove unused static function cddb_get_freedb_sites(), fixes the warning:
stream/stream_cddb.c:747: warning: 'cddb_get_freedb_sites' defined but not used

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31508 b3059339-0415-0410-9bf9-f77b7e298cf2

Remove unused static function cddb_freedb_sites_parse().

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31510 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:07 +02:00
diego 2a6b09a3d4 stream_ccda: Move cdda_priv structure to the only place it is used
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31506 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:07 +02:00
attila 2957d89083 stream/tcp.c: Prefer the use of inet_ntop over inet_ntoa
inet_ntop is ipv6 safe.
This fixes bug #1491.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31498 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:07 +02:00
reimar 27408d4f14 stream.h: support backswards stream_skip() within buffer
Never just ignore a backwards skip, even if the stream is not seekable
it might still be in a buffer.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31465 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:11:07 +02:00
reimar 7bc5b0253f tv.h: Change function pointer types to proper declarations
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31388 b3059339-0415-0410-9bf9-f77b7e298cf2

Note that the code is still questionable after this commit - the
shared data structure has pointers to "struct priv", but different
files use different incompatible definitions for that struct.
2010-11-02 04:07:42 +02:00
reimar 93891d0880 cache: Respect -cache-seek-min also for on-disk files
Should reduce issues with mp4/mov (playing those may involve a lot of
seeking inside the file).

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31371 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-11-02 04:07:42 +02:00
Uoti Urpala 497c32cdad Merge svn changes up to r31291 2010-06-02 18:55:18 +03:00
Uoti Urpala 2120eb5998 stream_radio.c: fix corrupt line from e3061749 2010-06-02 00:27:01 +03:00
reimar 326ec00733 Add a referrer option to set the HTTP Referer field.
Patch by chocolateboy [chocolate cpan org]


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31288 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-30 16:50:02 +00:00
Uoti Urpala 0e0d88ede9 Merge svn changes up to r31256 2010-05-30 16:39:41 +03:00
Uoti Urpala 688c66a5d5 Merge svn changes up to r31244 2010-05-30 16:29:14 +03:00
Uoti Urpala 8ce2c41ca5 Merge svn changes up to r31226 2010-05-30 16:25:04 +03:00
Uoti Urpala 2f1a518d45 Merge svn changes up to r31211
The merged cache2.c changes are known to have problems. Will merge
further fixes to them before merging this to the master branch.
2010-05-30 16:14:55 +03:00
Uoti Urpala 1888e57af7 cosmetics: "struct vf_instance* vf" -> "struct vf_instance *vf"
Change 'struct vf_instance' pointer arguments to more standard style
as in the subject. Also some other minor formatting fixes.

Patch by Diego Biurrun.
2010-05-29 17:20:44 +03:00
diego bce7550929 misc cosmetics: K&R style nits, #include placement, indentation
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31263 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-29 10:13:39 +00:00
reimar a564c5a6cc Fix typo in message.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31256 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-28 20:59:53 +00:00
reimar 6b255e5083 stream_check_interrupt should sleep even if no callback is set.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31255 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-28 18:49:02 +00:00
reimar 27d41fa5b3 100l, stream_check_for_interrupt argument is not in usec,
so we would end up sleeping for 10s instead of 10ms.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31254 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-28 18:47:03 +00:00
reimar 16e3978e1e Document time scale for stream_check_interrupt argument.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31253 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-28 18:45:25 +00:00
reimar 6f7c1ea409 Improve handling of cache process/thread hanging/being killed.
In particular allow a single STRG+C to quit MPlayer.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31251 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-28 17:26:31 +00:00
reimar 4448190ef0 Fix cache process accidentally being killed by SIGUSR1.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31250 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-28 16:57:16 +00:00
diego ae85fe1d2f Fix a bunch of typos in the stream cache code.
patch by Giorgio Vazzana, mywing81 gmail com


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31242 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-27 22:18:10 +00:00
diego 5e71e43bb5 Drop pointless _st suffix from 'struct stream'.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31237 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-27 20:38:25 +00:00
reimar c36de0867f Retry reading even if we hit eof before.
This allows playing growing files even with a large cache.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31226 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-26 18:23:43 +00:00
reimar 328306708f Re-enable wakeup-on-signal for cache process.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31224 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-26 17:56:11 +00:00
reimar d304c1d56c Disable waking the cache process up via a signal, it
currently causes read errors due to not handling EINTR.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@31223 b3059339-0415-0410-9bf9-f77b7e298cf2
2010-05-26 17:27:38 +00:00