1
mirror of https://github.com/mpv-player/mpv synced 2024-11-18 21:16:10 +01:00
mpv/demux
reimar 3f85094d4e Fix potential bugs and issues, general cleanups
Most of these are reimar fixing issues found by Coverity static
analyzer, and possibly some more cleanup commits independent from
this.

Since these commits are rather noisy, squash them all together.

Try to make code a bit clearer.

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

Conflicts:
	audio/out/ao_alsa.c

Check the correct variable for NULL.

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

Remove pointless unreachable code (the loop condition already checks
the 0xff case).

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

Fix typo that might have caused reading beyond the string end.

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

Do not needlessly use "long" types.

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

Use AV_RB32 to avoid sign extension issues and validate offset before using it.

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

Remove nonsense casts.

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

Fix crash in case sh_audio allocation failed.

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

Fix potential NULL dereference.

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

Conflicts:
	libmpcodecs/ad_ffmpeg.c

Note: Slightly modified.

Fix malloc failure check to check the correct variable.

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

Avoid code duplication and pointless casts.

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

Conflicts:
	stream/tv.c

Error out if an invalid channel list name was specified
instead of continuing and reading outside array bounds
all over the place.

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

Conflicts:
	stream/tv.c

Make array "static const".

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

Properly free resources even when encountering many
parse errors.

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

Conflicts:
	parser-cfg.c

Avoid leaks in error handling.

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

Do not do sign comparisons on "char" type which can be both signed or unsigned.

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

Free cookies file data after parsing it.

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

http_set_field only makes a copy of the string, so we still need to
free it.

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

check4proxies does not modify input URL, so mark it const.

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

Remove proxy "support" from stream_rtp and stream_upd, trying
to use a http proxy for UDP connections makes no sense.

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

Conflicts:
	stream/stream_rtp.c
	stream/stream_udp.c

Add url_new_with_proxy function to reduce code duplication and memleaks.

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

Conflicts:
	stream/pnm.c
	stream/stream_live555.c
	stream/stream_nemesi.c
	stream/stream_rtsp.c

Fix off-by-one errors in file descriptor validity checks.

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

Remove pointless cast.

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

Abort when opening the file failed instead of calling
"write" with an invalid descriptor.

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

Remove pointless local variable.

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

Conflicts:
	stream/http.c
2012-11-20 18:00:14 +01:00
..
asf.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
asfguid.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
asfheader.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
asfheader.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
aviheader.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
aviheader.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
aviprint.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
aviprint.h Rename directories, move files (step 1 of 2) (does not compile) 2012-11-12 20:06:14 +01:00
demux_asf.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
demux_avi.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
demux_cue.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
demux_edl.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
demux_gif.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
demux_lavf.c subtitles: improve support for libavformat demuxed subtitles 2012-11-16 21:21:16 +01:00
demux_mf.c demux_mf: allow displaying single image files, various cleanups 2012-11-16 21:21:16 +01:00
demux_mkv.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
demux_mng.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
demux_mpg.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
demux_packet.h Rename directories, move files (step 1 of 2) (does not compile) 2012-11-12 20:06:14 +01:00
demux_rawaudio.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
demux_rawvideo.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
demux_ts.c Fix potential bugs and issues, general cleanups 2012-11-20 18:00:14 +01:00
demux_ts.h Rename directories, move files (step 1 of 2) (does not compile) 2012-11-12 20:06:14 +01:00
demux.c demux_mf: allow displaying single image files, various cleanups 2012-11-16 21:21:16 +01:00
demux.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
ebml.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
ebml.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
extension.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
matroska.h Rename directories, move files (step 1 of 2) (does not compile) 2012-11-12 20:06:14 +01:00
mf.c demux_mf: allow displaying single image files, various cleanups 2012-11-16 21:21:16 +01:00
mf.h demux_mf: allow displaying single image files, various cleanups 2012-11-16 21:21:16 +01:00
mp3_hdr.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
mp3_hdr.h Rename directories, move files (step 1 of 2) (does not compile) 2012-11-12 20:06:14 +01:00
mp_taglists.c Rename directories, move files (step 1 of 2) (does not compile) 2012-11-12 20:06:14 +01:00
mp_taglists.h Rename directories, move files (step 1 of 2) (does not compile) 2012-11-12 20:06:14 +01:00
mpeg_hdr.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
mpeg_hdr.h Rename directories, move files (step 1 of 2) (does not compile) 2012-11-12 20:06:14 +01:00
ms_hdr.h Rename directories, move files (step 1 of 2) (does not compile) 2012-11-12 20:06:14 +01:00
parse_es.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
parse_es.h Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00
stheader.h Rename directories, move files (step 1 of 2) (does not compile) 2012-11-12 20:06:14 +01:00
video.c Rename directories, move files (step 2 of 2) 2012-11-12 20:08:18 +01:00