Reimar Döffinger
6fd00e9dd9
aacdec: add decode_channel_map overread check
...
All decode_channel_map calls together can easily read
more data than the amount of padding available.
Thus below patch adds an input length check before reading them.
Fixes some invalid reads with sample from
http://bugzilla.mplayerhq.hu/show_bug.cgi?id=1138
2011-05-07 18:08:46 +02:00
Reimar Döffinger
5631729c3d
Increase TS packet size detection buffer.
...
Fixes warning message with ticket #68 .
2011-05-07 17:38:18 +02:00
Reimar Döffinger
90f5e991be
Assume some TS packet size instead of failing completely.
...
Fixes ticket #68 .
2011-05-07 17:38:18 +02:00
jan gerber
5901cd6236
oggdec:Correct duration
...
Based on a patch by Reimar Döffinger.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 16:21:55 +02:00
Michael Niedermayer
c8981edd90
Only add 1 byte to av_malloc(0) when it actually returned NULL
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 16:21:54 +02:00
Michael Niedermayer
91ff05f6ac
Make av_realloc(0) behave like our av_malloc(0)
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 16:21:47 +02:00
Stefano Sabatini
ea7f73c52e
vsrc_buffer: during init, print information about timebase and sample aspect ratio
2011-05-07 12:48:19 +02:00
Stefano Sabatini
64c06615d2
vsrc_buffer: simplify av_vsrc_buffer_add_frame*() interface
...
Now that pix_fmt, width, and height are directly embedded in the AVFrame,
there is no need to pass these values as separate arguments.
2011-05-07 12:03:59 +02:00
Stefano Sabatini
01042d4123
lavc: set defaults in internal codec frames
...
This is required specifically for setting frame->format to -1,
otherwise it will be set to 0 = PIX_FMT_YUV420P and code reading
the format from the output decoded frame will get misled.
In particular fix regressions occurring with the pending vsrc_buffer
patch.
2011-05-07 12:03:59 +02:00
Stefano Sabatini
2beac7c325
ffmpeg: rename ost->pict_tmp to ost->resample_frame
...
The new name is more consistent with the employed naming scheme, and
more meaningful.
2011-05-07 12:03:59 +02:00
Stefano Sabatini
04c373c1e9
ffmpeg: prefer dec/enc over ost/ist->st->codec in do_video_out()
...
Compact code, improve readability.
2011-05-07 12:03:58 +02:00
Stefano Sabatini
a851fa7fec
ffmpeg: move resample_changed check within the #if !CONFIG_AVFILTER
...
The check and the corresponding message in do_video_out() are
unnecessary in the libavfilter path, as a similar check and message
are performed within the buffer source.
2011-05-07 12:03:58 +02:00
Stefano Sabatini
70c24b2171
ffmpeg: remove useless intermediary variable resample_dst in do_video_out()
2011-05-07 12:03:58 +02:00
Stefano Sabatini
f5a669c229
ffmpeg: simplify mid-stream reconfiguration when libavfilter is disabled
...
Implement lazy initialization of the image resample context, so that
the initialization code does not need to be duplicated.
Also manage the case in which resample/size change mid-stream. For
each packet the code computes if resampling is needed.
Previously the resample check was done only at the initialization, in
case size/format changed and no resample was detected at the init
stage ffmpeg was silently exiting.
2011-05-07 12:03:58 +02:00
Stefano Sabatini
566666caf3
lavfi: add libavfilter/avcodec.h and avfilter_copy_frame_props()
...
avfilter_copy_frame_props() avoids code duplication and increases
robustness.
The added files libavfilter/avcodec.[ch] are used for containing
utilities useful for gluing togheter libavfilter and libavcodec.
2011-05-07 12:03:49 +02:00
Stefano Sabatini
18ded93ab3
lavc: add format field to AVFrame
...
The format is a per-frame property, having it in AVFrame simplify the
operation of extraction of that information, since avoids the need to
access the codec/stream context.
2011-05-07 11:45:37 +02:00
Stefano Sabatini
22333a6b19
lavc: add width and height fields to AVFrame
...
width and height are per-frame properties, setting these values in
AVFrame simplify the operation of extraction of that information,
since avoids the need to check the codec/stream context.
2011-05-07 11:45:30 +02:00
Reimar Döffinger
314374e579
Use MAP_FAILED to check for mmap failure instead of manually
...
recreating the value.
2011-05-07 10:34:55 +02:00
Reimar Döffinger
f44967b1b5
Use av_fast_malloc instead of av_fast_realloc.
...
Avoids a memleak, is less code and might be faster.
2011-05-07 09:58:38 +02:00
Reimar Döffinger
6266c51538
Simplify condition.
2011-05-07 09:47:35 +02:00
Reimar Döffinger
20e5d64a1a
msvideo1enc: minor cosmetic cleanup, use FFALIGN, avoid calculating value
...
twice and add a missing "const".
2011-05-07 09:40:45 +02:00
Michael Niedermayer
e5a85164b1
Merge remote branch 'qatar/master'
...
* qatar/master:
mov: fix composition timestamps on movie fragments.
wmavoice: Use proper size in memeset().
2011-05-07 04:14:09 +02:00
Michael Niedermayer
c60d2be551
mp3enc:simplify
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 04:01:28 +02:00
Michael Niedermayer
e1e8a8ded4
mp3enc:better variable name for the frames field file postion.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 04:01:08 +02:00
Michael Niedermayer
4382bc2ceb
mp3enc: drop nested structs
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 03:59:57 +02:00
Michael Niedermayer
f2a90c3b34
mp3enc:use FFMIN()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 03:58:52 +02:00
Michael Niedermayer
01be9331c7
mp3enc:Drop unneeded floating point math.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 03:58:51 +02:00
Michael Niedermayer
ec9a5deb20
mp3enc: drop sum and count bytes instead of bitrates from decoded headers.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 03:58:17 +02:00
Michael Niedermayer
7d62475656
mp3enc: remove unneeded ifdef
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 03:43:12 +02:00
Michael Niedermayer
173c975ead
mp3enc: remove unneeded static const variables.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 03:43:12 +02:00
Peter Belkner
d62bf5d4e7
mp3enc: mux a XING header
...
The patch below provides exactly that to the MP3 muxer. A XING header
containing
* the numer of frames,
* the size, and
* a TOC
is generated.
It's based on an idea by Anton Khirnov (restricted to the number of
frames) found at
http://patches.ffmpeg.org/patch/1891/
The TOC is generated as found in lame's "VbrTag.c".
According to my tests the following reproduces the number of frames, the
size and the TOC in "c.mp3" from "b.mp3" (except a shift due to shorter
XING header generated by FFmpeg):
lame -V2 a.wav b.mp3
ffmpeg -i b.mp3 -acodec copy -y c.mp3
2011-05-07 03:27:38 +02:00
Michael Niedermayer
c34cb130b6
avfilter: dont use AVFilterLink as priv for pictures as its freed too early.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 01:02:38 +02:00
Michael Niedermayer
21d84246d5
avfilter: Fix ticket82 / fix initial buffer values.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-07 00:01:33 +02:00
Michael Niedermayer
39f66edbea
AVFilter: use picture pool to avoid malloc().
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 23:53:06 +02:00
Michael Niedermayer
fa3eddc011
avfilter_unref_buffer: favor av_freep()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 23:37:43 +02:00
Michael Niedermayer
c25a8d7dfb
mpegvideo: fix 422 lowres
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 19:32:30 +02:00
Michael Niedermayer
a565c7b7f2
aiffdec:Rewrite get_meta()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 17:39:31 +02:00
JULIAN GARDNER
423986fc09
Allow encodiing empty subtitles.
2011-05-06 17:12:42 +02:00
Michael Niedermayer
95f163b33b
swscale: Dither for unscaled 10->8bit per channel
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 15:19:27 +02:00
Michael Niedermayer
7915e038c6
swscale: dont reshuffle bytes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 13:18:55 +02:00
Yusuke Nakamura
45a811b512
mov: fix composition timestamps on movie fragments.
...
This fixes, for instance, the case that there is a track that has some samples with composition time offset and has a track run without sample-composition-time-offsets-present.
2011-05-05 22:07:54 -07:00
Alex Converse
869303bebd
wmavoice: Use proper size in memeset().
...
sizeof(array_functrion_argument) gives the size of the pointer type not
the size of the array to which it points.
2011-05-05 21:25:48 -07:00
Michael Niedermayer
6dc30b25c5
Merge remote branch 'qatar/master'
...
* qatar/master:
configure: warn if pkg-config is missing
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 04:28:23 +02:00
Michael Niedermayer
187528441a
avidec: correct frame_offset for seeking
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 03:54:35 +02:00
Carl Eugen Hoyos
cde5589717
Silence a warning if pkg_config is not installed.
2011-05-06 03:27:53 +02:00
Michael Niedermayer
ccd77fe59b
Makefile:Put lost tab back.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 02:21:52 +02:00
Michael Niedermayer
5e24098b84
avidec: detect mpeg4 keyframes in indexless avi
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 02:21:36 +02:00
Baptiste Coudurier
0fa8d19987
In svq3 decoder, check negative mb_type, fix potential crash.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 00:30:03 +02:00
Francesco Cosoleto
6c2845600d
fate: mention fate documentation in the error message
...
Signed-off-by: Francesco Cosoleto <cosoleto@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-06 00:30:02 +02:00
Michael Niedermayer
757ec2d7e7
MPEG: support 4:4:4 lowres
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2011-05-05 21:44:32 +02:00