Anton Khirnov
4736d003fa
cavsdec: check ff_get_buffer() return value
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable@libav.org
11 years ago
Michael Niedermayer
be99054e77
avcodec/cavsdec: print error messages in case of errors
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
bc1b828536
avcodec/cavsdec: use more specific error codes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
9ca32b2060
avcodec/cavsdec: print warning if no frame has been decoded
...
Fixes ticket3128
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
63f74cedc9
avcodec/cavsdec: reset stc
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Luca Barbato
39185ec4fa
cavs: Check for negative cbp
...
Sample-Id: 00000647-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
11 years ago
Luca Barbato
1b20d0f581
cavs: Return meaningful error values
11 years ago
Diego Biurrun
b2bed9325d
cosmetics: Group .name and .long_name together in codec/format declarations
11 years ago
Martin Storsjö
e90a6846c2
cavsdec: Make sure a sequence header has been decoded before decoding pictures
...
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
11 years ago
Martin Storsjö
f1e9398621
lavc: Rename avpriv_mpv_find_start_code after moving out from mpegvideo
...
Also move the declaration to internal.h, and add restrict qualifiers
to the declaration (as in the implementation).
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Diego Biurrun
63d744e2be
av_log_missing_feature() ---> avpriv_report_missing_feature()
12 years ago
Anton Khirnov
759001c534
lavc decoders: work with refcounted frames.
12 years ago
Michael Niedermayer
cf48b00640
cavsdec: check for value in get_ue_code()
...
Fixes integer overflow and prints an error in case the value is
invalid.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Diego Biurrun
88bd7fdc82
Drop DCTELEM typedef
...
It does not help as an abstraction and adds dsputil dependencies.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
12 years ago
Anton Khirnov
fb0cb11f09
cavsdec: export picture type in the output frame
12 years ago
Anton Khirnov
7d84826400
cavs: deMpegEncContextize
...
It does not use any of the mpegvideo infrastructure, just a few fields
from the context.
Fixes a segfault with the emu edge flag, since emu edge buffer is now
allocated as a part of the frame buffer allocation and cavs calls
ff_get_buffer() directly, it does not use mpegvideo buffer management.
Fixes a memleak of the last frame.
12 years ago
Anton Khirnov
185c2ef849
cavsdec: cosmetics, reformat
12 years ago
Michael Niedermayer
eee8c94f50
cavsdec: check ff_get_buffer() return value
...
Fixes CID747721
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
df9b956751
lavc: fix decode_frame() third parameter semantics for video decoders
...
It's got_frame, not data size
12 years ago
Anton Khirnov
594d4d5df3
lavc: add a wrapper for AVCodecContext.get_buffer().
...
It will be useful in the upcoming transition to refcounted AVFrames.
12 years ago
Martin Storsjö
eaa9b2e66c
avcodec: Rename avpriv_frame_rate_tab to ff_mpeg12_frame_rate_tab
...
This table doesn't need to be shared with libavformat any longer.
Add mpeg12 to the name to make it less ambiguous, while renaming it.
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Diego Biurrun
f75f4194d1
Restructure av_log_missing_feature message
...
Some invocations include a verb in the log message, others do not. Yet
av_log_missing_feature expects callers to provide a verb. Change the
function to include a verb instead and update the callers accordingly.
The result is a more natural function API and correct English in the
function invocations.
12 years ago
Michael Niedermayer
c20a696306
cavsdec: check for changing w/h.
...
Our decoder does not support changing w/h.
Fixes CVE-2012-2777 and CVE-2012-2784.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Michael Niedermayer
ba9e9605ad
cavsdec/decode_mb_b: fix return type
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7ea5dbcb83
cavsdec: Fix assertion failure.
...
The assert in decode_mb_b() is replaced by a normal error check for the
case that can occur with a damaged or crafted bitstream.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Mans Rullgard
6efb698883
cavsdsp: set idct permutation independently of dsputil
...
CAVS uses its own idct so using dsputil to set the permutation
is fragile.
Signed-off-by: Mans Rullgard <mans@mansr.com>
12 years ago
Diego Biurrun
a6d9f9e60e
cavs: Move inline functions only used in one file out of the header
12 years ago
Diego Biurrun
ef07ac1e12
cavs: Move data tables used in only one place to that file
12 years ago
Michael Niedermayer
f9505923a3
cavsdec: check dimensions being valid.
...
Fixes crash
Fixes Ticket1628
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Diego Biurrun
0177b7d23a
Improve descriptiveness of a number of codec and container long names
12 years ago
Michael Niedermayer
5a9fa84585
cavsdec: switch to av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 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
Michael Niedermayer
ec0965be36
cavsdec: ensure the tables have been allocated before using them
...
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
71e78e1f51
cavsdec: check stc in decode_slice_header()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
25715064c2
cavsdec: check for changing w/h.
...
Our decoder does not support changing w/h.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Ronald S. Bultje
83f15a1228
avs: fix infinite loop on end-of-stream.
...
The codec would keep returning the last decoded frame if the stream
contains B-frames, since it wouldn't clear that frame from the list of
frames to be returned to the user.
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
13 years ago
Diego Biurrun
324deaa268
Replace AVFrame pointer type punning by proper struct member assignments.
13 years ago
Diego Biurrun
47c0ac96aa
Replace AVFrame pointer casts by proper struct member accesses.
13 years ago
Martin Storsjö
efd29844eb
mpegvideo: Add ff_ prefix to nonstatic functions
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Diego Biurrun
3dc99a18d4
cosmetics: drop some pointless parentheses
13 years ago
Anton Khirnov
9138a130cd
lavc: use avpriv_ prefix for ff_frame_rate_tab.
...
It's used in lavf.
13 years ago
Anton Khirnov
773375c3d0
lavc: rename ff_find_start_code to avpriv_mpv_find_start_code
...
It's used in lavf.
13 years ago
Michael Niedermayer
961a1a81d8
cavsdec: check run value validity
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mans Rullgard
4a71da0f3a
cavs: fix some crashes with invalid bitstreams
...
This removes all valgrind-reported invalid writes with one
specific test file.
Fixes http://www.ocert.org/advisories/ocert-2011-002.html
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Michael Niedermayer
9f06c1c61e
cavsdec: avoid possible crash with crafted input
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
6481a36010
cavs: fix oCERT #2011-002 FFmpeg/libavcodec insufficient boundary check
...
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.
13 years ago
Diego Biurrun
657ccb5ac7
Eliminate FF_COMMON_FRAME macro.
...
FF_COMMON_FRAME holds the contents of the AVFrame structure and is also copied
to struct Picture. Replace by an embedded AVFrame structure in struct Picture.
14 years ago
Stefano Sabatini
ce5e49b0c2
replace deprecated FF_*_TYPE symbols with AV_PICTURE_TYPE_*
14 years ago