libswresample: Avoid needlessly large on-stack array.

We only actually need to use a tiny part of it.
Unfortunately we seem to have no real test coverage on
the code, so this is a bit risky.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Remove pointless if.

A branch to avoid some calculation seems unlikely to have any benefits.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
libswresample: move condition to start of loop.

This avoids several issue like calculating sum/maxcoef
incorrectly due to adding up matrix entries that will
be overwritten, as well as out-of-range writes to
s->matrix if the maximum allowed number of channels is used.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
lavf/segment: add segment_format_options option
doc/muxers/segment: reword text for examples, improve consistency
avcodec/mpegvideo: free_context_frame() cannot fail, make it return void

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/mpegvideo: Use "goto fail" for all error paths in ff_mpv_common_frame_size_change()

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/mpegvideo: check that the context is initialized in ff_mpv_common_frame_size_change()

The function otherwise would initialize the context without setting context_initialized
alternatively we could set context_initialized

Fixes valgrind anomalies related to ticket 3928

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avcodec/mpegvideo: Set err on failure in ff_mpv_common_frame_size_change()

Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
avformat/m4vdec: Check for non startcode 00 00 00 sequences in probe

Fixes miss detection of PCM as m4v
Fixes Ticket 3928

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
doc/filters.texi: improve the wording of the expr_int_format documentation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat: Check mkdir return error codes

Previously, the returned error codes were intentionally ignored
(see fadd3a68213), to avoid aborting if the directory already
existed. If the mkdir actually failed, this was caught when
opening files within the directory fails anyway.

By handling the error code here (but explicitly ignoring EEXIST),
the error messages and return codes in these cases are more
appropriate and less confusing.

Signed-off-by: Martin Storsjö <martin@martin.st>
ismindex: Avoid writing ismf files if no base name has been specified

Previously, this could create files named "(null).ismf", if the -ismf
parameter is specified (before an input file name), but without
specifying any base name.

Signed-off-by: Martin Storsjö <martin@martin.st>
Split off floating point AAN (I)DCT into separate components
ffserver: tests, force +global_header for ASF

Signed-off-by: Reynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Merge commit '803e82276b3716bf6012ec69e8854dae14a4fd2b'

* commit '803e82276b3716bf6012ec69e8854dae14a4fd2b':
  libavformat: Check mkdir return error codes

Conflicts:
	libavformat/hdsenc.c
	libavformat/smoothstreamingenc.c

See: c89f8f80cc83622471eaf99e451e78df68475e19
See: a3886ea3c5947ca05bfe01b053d9ce2f9725d9eb
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit 'fcf597625c7a991ca389f3a9b8ff4f5e383301c0'

* commit 'fcf597625c7a991ca389f3a9b8ff4f5e383301c0':
  ismindex: Avoid writing ismf files if no base name has been specified

Merged-by: Michael Niedermayer <michaelni@gmx.at>
Merge commit '1274ea8dbaec44355bde07f6bb31fec0c4e6fd2d'

* commit '1274ea8dbaec44355bde07f6bb31fec0c4e6fd2d':
  Split off floating point AAN (I)DCT into separate components

Conflicts:
	configure
	libavcodec/Makefile
	libavcodec/dct-test.c
	libavcodec/idctdsp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
avformat/utils: Exclude the header size when computing duration from bit_rate

This improves the estimate for MP3s with cover art tags.

Fixes Ticket2931

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
lavf/segment: abort in case of invalid segment format options