file: return proper error on seek failures
mov: detect EOF in mov_read_dref()

Avoid a near infinite loop.
Issue discovered by cosminamironesei.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
mov: stsd entries must be at least 16 byte

Fix near infinite loop in stsd parsing.
Bug found by: Diana Elena Muscalu

The size is unsigned according the specification.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
ffplay: dont wait 100ms if data is not yet ready

Also signal the wait if audio buffer is empty. This fixes jerky audio with
realtime sources.

Signed-off-by: Marton Balint <cus@passwd.hu>
Merge remote-tracking branch 'cus/stable'

* cus/stable:
  ffplay: dont wait 100ms if data is not yet ready

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avconv: flush filtered frames before reconfiguring filters

This prevents lost frames after a resolution change.
lavu/parseutils: fix av_small_strptime() whitespace directive parsing

According to POSIX, strptime() should consume whitespaces in the date
string everytime a whitespace conversion specification is found in the
date format specification. Make av_small_strptime() conform with this
behavior.

In particular, should fix trac ticket #1739.
fate: add av_small_strptime() test to fate-parseutils
Merge remote-tracking branch 'qatar/master'

* qatar/master:
  avconv: flush filtered frames before reconfiguring filters
  mov: stsd entries must be at least 16 byte
  mov: detect EOF in mov_read_dref()
  file: return proper error on seek failures

Conflicts:
	libavformat/file.c
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
lavfi: replace empty input/output lists with null pointers

Signed-off-by: Mans Rullgard <mans@mansr.com>
buffersrc: add const to the AVFrame* argument of av_buffersrc_write_frame()
lavf/id3v2: do not export empty fields.

This also avoids a memleak.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
id3v2: strdup the genre name explicitly.

It would have been done anyway in the av_dict_set() call.

This simplifies the code and avoid a warning because of assigning a
const string from ff_id3v1_genre_str to a non-const variable.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
avconv: don't pass a bogus parameter to avfilter_graph_create_filter().

The buffer sink does not take any parameters.

Fixes an uninitialized variable warning.
lavc: add const to private codec class initialization.

Silences a warning about discarding const.
lavc: replace AVCodecContext.encode with subtitle-specific callback

AVCodecContext.encode is currently used only for subtitles, encode2 is
used for audio and video.
xsubenc: reindent
avfiltergraph: silence an uninitialized variable warning

The warning is:
libavfilter/avfiltergraph.c: In function ‘avfilter_graph_config’:
libavfilter/avfiltergraph.c:528:9: warning: ‘best_idx’ may be used uninitialized in this function [-Wuninitialized]
libavfilter/avfiltergraph.c:479:13: note: ‘best_idx’ was declared here

Initialize it to an invalid value and add an assert that it's properly
set later.
alsdec: check opt_order.

Fixes out of array write in quant_cof.
Also make sure no invalid opt_order stays in the context.

Fixes CVE-2012-2775

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
alsdec: Check k used for rice decoder.

Values that fail this check will cause failure of decode_rice()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>