Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Martin Storsjö
00c3b67b8a
cosmetics: Align codec declarations
...
Also break some long lines, remove codec function placeholder comments
and add spaces in sample/pixel format lists.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Paul B Mahol
a0b07b8fc5
vmdvideo: remove superfluous strings from av_log messages
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
2278ecc434
vmdav: check that theres enough space for a chunk remaining.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Justin Ruggles
0eea212943
Add avcodec_decode_audio4().
...
Deprecate avcodec_decode_audio3().
Implement audio support in avcodec_default_get_buffer().
Implement the new audio decoder API in all audio decoders.
13 years ago
Carl Eugen Hoyos
1fc573dd25
Increase Sierra VMD palette dynamics.
13 years ago
Carl Eugen Hoyos
90f75f9804
Set Sierra VMD palette opaque.
13 years ago
Reimar Döffinger
371e165443
Try to set AVFrame.reference to correct values.
...
I am not sure these new values are correct, not am I sure
the semantics are a good idea since we do not seem to make any
use of them but they caused a lot of confusion, but this
seems to make things closer to matching the documentation.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Laurent Aimar
c0cbe36b18
vmd: fix segfaults on corruped streams
...
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
13 years ago
Justin Ruggles
4568c2bf97
vmdaudio: fix decoding of 16-bit audio format.
...
The initial sample of each block is raw 16-bit PCM, not DPCM.
Fixes decoding of all samples in:
http://streams.videolan.org/samples/game-formats/sierra-vmd/Lighthouse/
13 years ago
Laurent Aimar
35cb6854bb
Fix potential pointer arithmetic overflows in rle_unpack() of vmd video decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Laurent Aimar
4749e07498
Fix out of bound reads in rle_unpack() of vmd video decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Laurent Aimar
e07377e736
Check for out of bound reads in vmd_decode() of vmd video decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Laurent Aimar
78cb39d2b2
Fix potential pointer arithmetic overflows in lz_unpack of vmd video decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Laurent Aimar
5127f465bd
Prevent out of bound read in lz_unpack in vmd video decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Laurent Aimar
6a6383bebc
Prevent NULL dereferences when the previous frame is missing in vmd video decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Laurent Aimar
e7aed1280e
Check for invalid update parameters in vmd video decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Laurent Aimar
00cbe9e405
Fix potential overread in vmd audio decoder.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
ec6402b7c5
lavc: use designated initialisers for all codecs.
...
It's more readable and less prone to breakage.
14 years ago
Justin Ruggles
e6c52cee54
Replace usages of av_get_bits_per_sample_fmt() with av_get_bytes_per_sample().
...
av_get_bits_per_sample_fmt() is deprecated.
14 years ago
Mans Rullgard
e65ab9d94f
Remove unused variables
14 years ago
Clément Bœsch
adba9c6352
Fix various unused variable warnings
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
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.
14 years ago
Mans Rullgard
2912e87a6c
Replace FFmpeg with Libav in licence headers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Justin Ruggles
1e898e7d35
vmdaudio: output 8-bit audio as AV_SAMPLE_FMT_U8.
...
There is no need to expand to 16-bits. Just use memcpy() to copy the raw data.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 1108f8998c
)
14 years ago
Justin Ruggles
f3618b014b
vmdaudio: remove unnecessary fields from VmdAudioContext and use the corresponding AVCodecContext fields instead.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 2ec7862db8
)
14 years ago
Justin Ruggles
5e7c422dda
vmdaudio: add out_bps to VmdAudioContext and use it to replace hard-coded sample size.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 1e86d685e0
)
14 years ago
Justin Ruggles
504dff8e4e
vmdaudio: simplify vmdaudio_decode_frame() by handling block_type first, then making a single call to vmdaudio_loadsound().
...
This also adds output buffer size checks for AUDIO and SILENCE block types.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 1574eff3d2
)
14 years ago
Justin Ruggles
83e94d50cb
cosmetics: reindent after previous commit
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit ba9516cca8
)
14 years ago
Justin Ruggles
fb0e3c2b96
vmdaudio: move all silence chunk handling to vmdaudio_loadsound().
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 762b386e4a
)
14 years ago
Justin Ruggles
6f3c837f40
cosmetics: remove debugging cruft
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 8e9027d266
)
14 years ago
Justin Ruggles
684512e16d
cosmetics: reindent after previous commit
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 868f2f4d90
)
14 years ago
Justin Ruggles
aa23625037
vmdaudio: simplify buffer pointer and header size handling.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 2d213695fc
)
14 years ago
Justin Ruggles
b4b5e92286
vmdaudio: set *data_size to zero when skipping small packets and add a warning log message.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 7a4fb3fd93
)
14 years ago
Justin Ruggles
ebed7b6865
vmdaudio: validate block type
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 22f893e1c9
)
14 years ago
Justin Ruggles
149d36877a
vmdaudio: use macros and a local variable for block type.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit dd1af5136f
)
14 years ago
Justin Ruggles
2be17a71ae
vmdaudio: correct the silent chunk count in the first block.
...
This fixes A/V sync with several samples, notably:
http://samples.mplayerhq.hu/game-formats/sierra-vmd/swat_*.vmd
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 6989cb2dae
)
14 years ago
Justin Ruggles
c11c79222e
vmdaudio: output audio samples for standalone silent blocks.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 9b73f78600
)
14 years ago
Justin Ruggles
2ac19b75c0
vmdaudio: remove duplicated code by merging mono and stereo decoding.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit 1328d43313
)
14 years ago
Justin Ruggles
994e445a17
vmdaudio: fix raw_block_size calculation.
...
The size should depend on the output sample size, not the internal bit depth.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
(cherry picked from commit a58bcb40b1
)
14 years ago
Justin Ruggles
1108f8998c
vmdaudio: output 8-bit audio as AV_SAMPLE_FMT_U8.
...
There is no need to expand to 16-bits. Just use memcpy() to copy the raw data.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Justin Ruggles
2ec7862db8
vmdaudio: remove unnecessary fields from VmdAudioContext and use the corresponding AVCodecContext fields instead.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Justin Ruggles
1e86d685e0
vmdaudio: add out_bps to VmdAudioContext and use it to replace hard-coded sample size.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Justin Ruggles
1574eff3d2
vmdaudio: simplify vmdaudio_decode_frame() by handling block_type first, then making a single call to vmdaudio_loadsound().
...
This also adds output buffer size checks for AUDIO and SILENCE block types.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Justin Ruggles
ba9516cca8
cosmetics: reindent after previous commit
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Justin Ruggles
762b386e4a
vmdaudio: move all silence chunk handling to vmdaudio_loadsound().
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Justin Ruggles
8e9027d266
cosmetics: remove debugging cruft
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Justin Ruggles
868f2f4d90
cosmetics: reindent after previous commit
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Justin Ruggles
2d213695fc
vmdaudio: simplify buffer pointer and header size handling.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago