Commit Graph

29445 Commits

Author SHA1 Message Date
Stefano Sabatini 5eb901cfec vsrc_movie: fix leak in request_frame()
Also set movie->picref to NULL, in order to avoid a crash in uninit()
when movie->picref is unreffed again and it was already freed.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:42:56 +02:00
Roger Pau Monné 10d39405fa lavfi: add key_frame and pict_type to AVFilterBufferRefVideo.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:42:13 +02:00
Michael Niedermayer 7a11c82fb7 vsrc_buffer: add sample_aspect_ratio fields to arguments.
This fixes aspect handling in ffmpeg.

This is based on a patch by Baptiste.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:38:24 +02:00
Mark Himsley 2f84bb4236 lavfi: add fieldorder filter
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:37:41 +02:00
Stefano Sabatini 68e23c083a scale: make the filter parametric
Make the filter accept parametric expressions for the output video
size.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:29:29 +02:00
James Darnley b137bf7df3 yadif: support 16-bit
Fixes by Michael Niedermayer <michaelni@gmx.at>

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:21:40 +02:00
James Darnley 88312a4de3 yadif: support more than yuv420p.
and correctly support grey8

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:15:54 +02:00
Michael Niedermayer d85e18e6e3 yadif: Fix assert() failure
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-26 07:15:10 +02:00
Michael Niedermayer 3788a3c0c0 Merge remote branch 'qatar/master'
* qatar/master:
  graphparser: add a NULL check on the argument passed to strstr
  setdar: prefer "sar" over "par" in log info message
  fade: fix draw_slice() check on fade->factor value
  fade: make draw_slice() chroma check against planes 1 and 2
  win32: include the correct header in cmdutils.c
  ac3: fix memleak in fixed-point encoder
  flashsv: Return more meaningful error values.
  flashsv: Employ explicit AVCodec struct initializers.
  read AVI palette from the end of extradata
  cosmetics: K&R coding style and more whitespace for Flash Screen Video

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-26 04:21:15 +02:00
Michael Niedermayer 05815b3545 Fix issue1503, this fix may be incomplete we need more samples to know for sure.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-26 02:44:33 +02:00
Michael Niedermayer 7157334c37 wmadec: prevent null pointer call.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-26 02:44:33 +02:00
Stefano Sabatini 1da254b849 fraps: do not set avctx->pix_fmt to none in decode_init()
This is required for setting up the filterchain, as it requires the
pixel format to be set, which is usually done when probing the file
with av_find_stream_info().

Fix trac issue #83.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-25 23:17:59 +02:00
Stefano Sabatini f80b381bfd graphparser: add a NULL check on the argument passed to strstr
Fix crash in create_filter() which occurrs if a scale filter with no
args is provided.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-25 22:45:44 +02:00
Stefano Sabatini c61bfc113a setdar: prefer "sar" over "par" in log info message
This is more consistent with the terminology adopted by the aspect
filter names.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-25 22:45:44 +02:00
Mark Himsley b04d1abb40 fade: fix draw_slice() check on fade->factor value
draw_slice() checks that the fade factor is < 65536 and only
calculates the fade if so. But the fade factor is clipped in
end_frame() by av_clip_uint16() to 65535, so the fade is calculated
for every frame.  This patch alters the check so that it compares with
< 65535 (UINT16_MAX).

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-25 22:45:44 +02:00
Mark Himsley 9026b27e84 fade: make draw_slice() chroma check against planes 1 and 2
draw_slice() checks that planes 0 and 1 of AVFilterBufferRef's data
are not NULL before manipulating planes 1 and 2. This patch makes the
check against planes 1 and 2. More senseful and possibly more robust.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2011-04-25 22:45:44 +02:00
Stefano Sabatini bd2a3700c0 lsws: prevent overflow in sws_init_context()
In the loop:
    for (i=0; i<dstH; i++) {
        int chrI= i*c->chrDstH / dstH;

when i*c->chrDstH > INT_MAX this leads to an integer overflow, which
results in a negative value for chrI and in out-of-buffer reads. The
overflow is avoided by forcing int64_t arithmetic by casting i to
int64_t.

Fix crash, and trac issue #72.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-25 22:45:19 +02:00
Stefano Sabatini 1d6c82d405 ffplay: fix logic for selecting the show mode in case of missing video
Also automatically select the show mode only if not specified by the
user.

Fix trac issue #109.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-25 22:45:17 +02:00
Stefano Sabatini 54ad8e06f4 ffplay: name ShowMode enum
Help debugging with GDB, maybe cleaner/safer.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-25 22:45:12 +02:00
Luca Barbato ba9327ea65 win32: include the correct header in cmdutils.c
CommandLineToArgvW requires windows.h, include it directly
2011-04-25 21:57:30 +02:00
Janne Grunau 6ad2bafcfd ac3: fix memleak in fixed-point encoder
caused by typo in mdct_end
2011-04-25 20:27:05 +02:00
Manfred Tremmel 03a91c7453 Patch from Packman (OpenSuse - packages) to silence rpmlint.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-25 19:53:47 +02:00
Reimar Döffinger 7f725f234e Set start_time to 0 for raw audio files.
None of the raw audio files have timestamps, thus setting
start_time to 0 should be reasonable.
2011-04-25 16:51:27 +02:00
Reimar Döffinger 663d002410 Remove now unused audio_float configure option. 2011-04-25 16:51:27 +02:00
Reimar Döffinger bde9671795 dca: allow selecting float output at runtime. 2011-04-25 16:51:27 +02:00
Reimar Döffinger 5aff31b136 vorbisdec: allow selecting float output at runtime. 2011-04-25 16:51:27 +02:00
Reimar Döffinger 26d5a4b6b4 aacdec: Allow selecting float output at runtime. 2011-04-25 16:51:27 +02:00
Reimar Döffinger 4c7ad768e1 ac3dec: allow selecting float output at runtime. 2011-04-25 16:51:27 +02:00
Diego Biurrun a14c08247d flashsv: Return more meaningful error values. 2011-04-25 16:01:58 +02:00
Diego Biurrun 46cb2da1f0 flashsv: Employ explicit AVCodec struct initializers. 2011-04-25 15:41:10 +02:00
Reimar Döffinger 5e9de76f54 Do not set non_interleaved for DV-in-AVI.
It does not make sense (DV is interleaved by design) and
it avoids a crash when the non-interleaved code tries to
use the priv_data of streams created by the DV demuxer.
The crash could be avoided differently, but then that stream
would still lack an index and would not play correctly in
non-interleaved mode.
Fixes e.g. samples/ffmpeg-bugs/roundup/issue1514/Dennis0002_video1.avi
2011-04-25 14:17:59 +02:00
Carl Eugen Hoyos 6c93641683 Warn if the source has unsupported (or no) channel layout. 2011-04-25 11:23:06 +02:00
Kostya Shishkov 23f40a0788 read AVI palette from the end of extradata
Official AVI specification says that stream header in case of video contains
BITMAPINFO, which is equal to BITMAPINFOHEADER and optional palette. Currently
lavf AVI demuxer thinks otherwise which produces garbage on codecs that have
both palette and extradata (luckily, there are not so many such codecs).

An example of such file is:
http://samples.multimedia.cx/V-codecs/KMVC/baseball1.avi
(IIRC, MSS1 or MSS2 also had such situation but they are still not supported
by lavc).

As a side note, passing palette in extradata as it's been done previously is
not quite correct since proper _extra_ data is surplus bytes in
BITMAPINFOHEADER, not including palette.

Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
2011-04-24 23:26:45 -07:00
Peter Ross f27ac6d83c Set channel layout for 4 and 5.1 channel cdata audio files
Patch from Carl Eugen Hoyos (cehoyos at ag dot or dot at)

Signed-off-by: Peter Ross <pross@xvid.org>
2011-04-25 12:13:51 +10:00
Michael Niedermayer 989fb05fe3 Merge remote branch 'qatar/master'
* qatar/master:
  vorbisdec: Employ proper printf format specifiers for uint_fast32_t.
  applehttp: Don't export variant_bitrate if it isn't known
  crypto: Use av_freep instead of av_free
  configure: Add missing libm library dependencies to .pc files.
  oggdec: reindent after 8f3eebd6
  configure: Add missing libavutil inter-library dependencies to .pc files.

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-25 02:29:09 +02:00
unknown author 2671ab3996 Check mmap() return against correct value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-25 01:54:29 +02:00
Diego Biurrun 293fe6da01 cosmetics: K&R coding style and more whitespace for Flash Screen Video 2011-04-25 01:50:07 +02:00
Diego Biurrun 2441003d3f vorbisdec: Employ proper printf format specifiers for uint_fast32_t.
libavcodec/vorbisdec.c:543: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘uint_fast32_t’
libavcodec/vorbisdec.c:543: warning: format ‘%d’ expects type ‘int’, but argument 5 has type ‘uint_fast32_t’
2011-04-25 01:39:55 +02:00
Carl Eugen Hoyos 03546a9ac8 Support fourcc MMJP.
Fixes ticket #107.
2011-04-25 00:44:48 +02:00
Carl Eugen Hoyos 69cf1824c6 Support fourcc XVIX.
Fixes ticket #106.
2011-04-25 00:44:48 +02:00
Carl Eugen Hoyos a8117a62f4 Support fourcc M263.
Fixes ticket #103.
2011-04-25 00:44:48 +02:00
ami_stuff 3e1c59ebc6 Support fourcc auv2.
Fixes ticket #101.
2011-04-25 00:44:48 +02:00
Reimar Döffinger 9a962f3055 Fix indentation. 2011-04-25 00:20:03 +02:00
Reimar Döffinger 02e3f7d042 Support PARSER_FLAG_COMPLETE_FRAMES for h261 and h263 parsers. 2011-04-25 00:20:03 +02:00
Stefano Sabatini 69f58958ce ffplay: avoid SIGFPE exception in SDL_DisplayYUVOverlay
In video_image_display(), fix exception occurring when the size of the
rectangle passed to SDL_DisplayYUVOverlay() is 0x0, which happens when
interactively resizing the SDL window.
This is done by forcing the minimum size to 1x1.

Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
2011-04-24 23:10:26 +02:00
Michael Niedermayer fbfcc8f1b7 avi: try to synchronize the points in time of the starts of streams after seeking.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 22:38:05 +02:00
Michael Niedermayer 8a68697dc6 Add flag to force demuxers to sort more strictly by dts.
This enables non interleaved AVI mode for example.
Players that are picky on strict interleaving can set this.
Patches to only switch to non intereaved AVI mode when the index is not strictly
correctly interleaved are welcome.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-04-24 21:48:36 +02:00
Martin Storsjö 5f85d49b68 applehttp: Don't export variant_bitrate if it isn't known
If there are no variants, the total bitrate of the single
stream isn't known, and exporting variant_bitrate = 0 does
look weird, since there really aren't any variants.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-24 21:30:03 +03:00
Martin Storsjö ac9cf2e5c4 crypto: Use av_freep instead of av_free
Using av_freep is generally good practice.

Signed-off-by: Martin Storsjö <martin@martin.st>
2011-04-24 21:30:03 +03:00
Philip Langdale e4253b1a4f CrystalHD: Add AVOption to configure hardware downscaling.
The CrystalHD hardware can do scaling, which is particularly
desirable when dealing with some high resolution clips that take
so long to decode and copy out that they end up playing back
slower than realtime. By using scaling, we can make the output
frames smaller and reduce the copy out time.

This option takes the desired horizontal width in pixels, and
the hardware will do an aspect-scale. Upscaling is not supported
and the hardware will simply ignore any request to do so.

Signed-off-by: Philip Langdale <philipl@overt.org>
2011-04-24 09:40:58 -07:00