1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00
Commit Graph

70922 Commits

Author SHA1 Message Date
Ronald S. Bultje
743d6a2782 videodsp: don't overread edges in vfix3 emu_edge.
Fixes trac ticket 3226. Also see Andreas' analysis in
https://bugs.debian.org/801745, which was very helpful.
(cherry picked from commit 52f84d82bd)
2015-10-25 01:13:34 +02:00
Rodger Combs
e43e282512 lavf/matroskadec: Fully parse and repack MP3 packets
Fixes https://trac.ffmpeg.org/ticket/4776

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b4b2717ffe)
2015-10-09 21:48:25 +02:00
Michael Niedermayer
4afa762511 avcodec/h264_mp4toannexb_bsf: Reorder operations in nal_size check
Fixes Ticket4778

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2bb54b82b5)
2015-10-09 21:48:05 +02:00
Michael Niedermayer
bd4351b5d7 avformat/oggenc: Check segments_count for headers too
Fixes infinite loop and segfault in ogg_buffer_data()
Fixes Ticket4806

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 81a8701eb5)
2015-10-09 21:47:52 +02:00
Michael Niedermayer
108a971cd2 avformat/avidec: Workaround broken initial frame
Fixes Ticket4851

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3e2ef00394)
2015-10-09 21:47:07 +02:00
Hendrik Leppkes
3cc3d239f2 hevc: properly handle no_rasl_output_flag when removing pictures from the DPB
Fixes ticket #4185.

Reviewed-By: Mickael Raulet <Mickael.Raulet@insa-rennes.fr>
Signed-off-by: Hendrik Leppkes <h.leppkes@gmail.com>
(cherry picked from commit 0118158efa)
2015-10-09 21:46:52 +02:00
Ronald S. Bultje
488041cfb0 hevc: fix wpp threading deadlock.
Fixes ticket 4258.
(cherry picked from commit 74e4948235)
2015-10-09 21:46:39 +02:00
Michael Niedermayer
ef6d6f8906 avcodec/ffv1: seperate slice_count from max_slice_count
Fix segfault with too large slice_count
Fixes Ticket4879

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit aa6c43f3fd)

Conflicts:
	libavcodec/ffv1enc.c
	libavcodec/ffv1.c
2015-10-09 21:46:03 +02:00
Przemysław Sobala
b0b37e018b lavf/img2dec: Fix memory leak
Fixes #4886

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 01dd7e025c)
2015-10-09 21:44:11 +02:00
wm4
281dce1a3e avcodec/mp3: fix skipping zeros
Commits 43bc5cf9 and c5371f77 add code for skipping initial zeros in mp3
packets. This code forgot to report to the user that data was skipped at
all.

Since audio codecs allow partial packet decoding, the user application
has to rely on the return value. It will remove the data reported as
consumed by the decoder, and feed it to the decoder again. This resulted
in the mp3 frame after the zero region to be decoded over and over
again, until the zero region was finally skipped by the application.

Fix this by including the amount of skipped bytes to the number of
consumed bytes returned by the decode call.

Fixes trac ticket #4890.
(cherry picked from commit cb1da9fb8d)
2015-10-09 21:43:56 +02:00
Clément Bœsch
d75a5fe4b9 avformat/srtdec: make sure we probe a number
Fixes regression since 7218352e02: WebVTT
files were matching the SRT probing.
(cherry picked from commit 40d9d6de90)
2015-10-09 21:43:37 +02:00
Clément Bœsch
6ed351c096 avformat/srtdec: more lenient first line probing
Fixes Ticket #4898
(cherry picked from commit 7218352e02)
2015-10-09 21:43:26 +02:00
James Almer
be9ec446a0 doc: mention libavcodec can decode Opus natively
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit fd9ac48dc8)
2015-09-20 23:28:32 -03:00
Michael Niedermayer
faed1deec9 MAINTAINERS: Remove myself as leader
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f2c58931e6)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-31 18:35:30 +02:00
Michael Niedermayer
b17cec5262 update changelog
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-23 02:05:35 +02:00
Andreas Cadhalpun
088733414a imc: use correct position for flcoeffs2 calculation
flcoeffs2[pos] should be the log2 of flcoeffs1[pos].
flcoeffs1[0] can be 0 here, thus flcoeffs2[pos] gets set to -inf,
causing problems further down.

This seems to have been copied from imc_decode_level_coefficients in
commit 4eb4bb3 without updating the position.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 75fd5ce4c1)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 27816fb9ef)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-23 01:37:44 +02:00
Andreas Cadhalpun
44a9e2dbba hevc: check slice address length
It is used as get_bits argument and reading 0 bits isn't supported.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 05cc8c8e4b)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit f06d9dced4)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-23 01:37:36 +02:00
Andreas Cadhalpun
2d89356641 snow: remove an obsolete av_assert2
It asserts that the frame linesize is larger than 37, but it can be
smaller and decoding such frames works.

Before commit cc884a35 src_stride > 7*MB_SIZE was necessary, because the
blocks were interleaved in the tmp buffer and the last block was added
with an offset of 6*MB_SIZE.
It was changed for src_stride <= 7*MB_SIZE to write the blocks
sequentially, hence the larger tmp_step.
After that the assert was only necessary to make sure that the buffer
remained large enough.
Since commit bd2b6b33 s->scratchbuf is used as tmp buffer.
As part of commit 86e107a7 the minimal scratchbuf size was increased to
256*7*MB_SIZE, which is enough for any src_stride <= 7*MB_SIZE.

Also add a comment explaining the tmp_step calculation.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 3526a120f9)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 26cb351452)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-23 01:37:30 +02:00
Andreas Cadhalpun
3c96f21d6e webp: fix infinite loop in webp_decode_frame
The loop always needs at least 8 bytes for chunk_type and chunk_size.
If fewer are left, bytestream2_get_le32 just returns 0 without
reading any bytes, leading to an infinite loop.

Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 0762152f7a)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 762a5878a6)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-23 01:37:17 +02:00
Andreas Cadhalpun
e812220a30 wavpack: limit extra_bits to 32 and use get_bits_long
More than 32 bits can't be stored in an integer and get_bits should not
be used with more than 25 bits.

Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit d0eff8857c)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit f0af6e705f)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-23 01:37:07 +02:00
Andreas Cadhalpun
7f84858dcf ffmpeg: only count got_output/errors in decode_error_stat
If threading is used, the first (thread_count - 1) packets are read
before any frame/error is returned. Counting this as successful decoding
is wrong, because it also happens when no single frame could be decoded.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit bd0f14123f)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 70b97a89d2)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-23 01:36:59 +02:00
Andreas Cadhalpun
32df1cd6ac ffmpeg: exit_on_error if decoding a packet failed
This is the second part of the fix for ticket #4370.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit cd64ead8d9)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>

Conflicts:
	ffmpeg.c
(cherry picked from commit 1d1adf5ff4)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-23 01:36:10 +02:00
Andreas Cadhalpun
a0f50ddcb8 pthread_frame: forward error codes when flushing
This is the first part of the fix for ticket #4370.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 32a5b63126)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit acfad331ad)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-23 01:35:37 +02:00
Andreas Cadhalpun
dc85a75332 huffyuvdec: validate image size
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 9a345802ed)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 43f8a422b3)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-23 01:35:29 +02:00
Andreas Cadhalpun
21769e3884 wavpack: use get_bits_long to read up to 32 bits
get_bits should not be used for more than 25 bits.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit f9883a669c)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 95bd0f3a4b)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-23 01:35:21 +02:00
Andreas Cadhalpun
a3d3e0a6bc nutdec: check maxpos in read_sm_data before returning success
Otherwise sm_size can be larger than size, which results in a negative
packet size.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 6b9fdf7f4f)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit eddf146ada)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-23 01:35:09 +02:00
Andreas Cadhalpun
fdf166c5d2 vc1dec: use get_bits_long and limit the read bits to 32
get_bits should not be used with more than 25 bits.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 1f1e0a2971)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 2e1226a695)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-23 01:33:48 +02:00
Andreas Cadhalpun
874b3117ed mpegaudiodec: copy AVFloatDSPContext from first context to all contexts
This fixes a segfault when decoding multi-channel MP3onMP4 files.

This is similar to commit cb72230d for MPADSPContext.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 151dbe4579)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit f66d2bf949)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-23 01:33:34 +02:00
Michael Niedermayer
827a8bfc64 Update for 2.6.4
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 11:10:34 +02:00
Michael Niedermayer
e8ce2770b1 avcodec/vp8: Check buffer size in vp8_decode_frame_header()
avoids null pointer dereference
Fixes: signal_sigsegv_d5de40_964_vp80-00-comprehensive-010.ivf with memlimit of 1048576

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 599d746e07)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Michael Niedermayer
e3a521d817 avcodec/vp8: Fix null pointer dereference in ff_vp8_decode_free()
Fixes: signal_sigsegv_d5de23_967_vp80_00_comprehensive_010.ivf with memlimit 524288

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a84f0e8d8f)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Michael Niedermayer
0de6cf5fdd avcodec/diracdec: Check for hpel_base allocation failure
Fixes null pointer dereference
Fixes: signal_sigsegv_b02a96_280_RL_420p_ffdirac.drc with memlimit of 67108864

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 1c5b712c0a)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Michael Niedermayer
620b3e680c avcodec/rv34: Clear pointers in ff_rv34_decode_init_thread_copy()
Avoids leaving stale pointers
Fixes: signal_sigabrt_7ffff70eccc9_819_sabtriple.rm with memlimit 536870912

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3197c0aa87)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Michael Niedermayer
b7f1d51b9c avfilter/af_aresample: Check ff_all_* for allocation failures
Fixes: signal_sigabrt_7ffff70eccc9_498_divx502.avi with memlimit 1572864

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2ea8a48083)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Michael Niedermayer
ed6d8e185a avcodec/pthread_frame: clear priv_data, avoid stale pointer in error case
Fixes: b4b47bc2b3fb7ca710bfffe5aa969e37_signal_sigabrt_7ffff70eccc9_744_nc_sample2.avi with memlimit of 4194304

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f1a38264f2)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Michael Niedermayer
fb47b6cb4b swscale/utils: Clear pix buffers
Fixes use of uninitialized memory
Fixes: a96874b9466b6edc660a519c7ad47977_signal_sigsegv_7ffff713351a_744_nc_sample.avi with memlimit 2147483648

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit a5d44d5c22)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Zhang Rui
5db095793a avutil/fifo: Fix the case where func() returns less bytes than requested in av_fifo_generic_write()
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fcbea93cf8)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Michael Niedermayer
7dbfeeeb94 ffmpeg: Fix cleanup after failed allocation of output_files
Fixes: 39a25908b84604acdaa490138282d091_signal_sigsegv_7ffff713351a_331_WAWV.avi with memlimit of 262144

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6e80fe1ecd)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Michael Niedermayer
e604662d04 avformat/mov: Fix deallocation when MOVStreamContext failed to allocate
Fixes: 260813283176b57b3c9974fe284eebc3_signal_sigsegv_7ffff713351a_991_xtrem_e2_m64q15_a32sxx.3gp with memlimit of 262144

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 15629129dd)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Michael Niedermayer
77eddee375 ffmpeg: Fix crash with ost->last_frame allocation failure
Fixes: 1013dbde2c360d939cc2dfc33e4f275c_signal_sigsegv_a0500f_45_320vp3.nsv with memlimit of 536870912

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fd4c87fa3b)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Michael Niedermayer
fca28d35e4 ffmpeg: Fix cleanup with ost = NULL
Fixes: 09e670595acbdafb226974b08dab66e3_signal_sigabrt_7ffff70eccc9_991_xtrem_e2_m64q15_a32sxx.3gp with memlimit of 1048576

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 503ec7139f)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Michael Niedermayer
9d0f7a8d78 avcodec/pthread_frame: check avctx on deallocation
Fixes null pointer dereferences
Fixes: af1a5a33e67e479f439239097bd0d4fd_signal_sigsegv_7ffff713351a_152_Dolby_Rain_Logo.pmp with memlimit of 8388608

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5d346feafa)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Michael Niedermayer
df6f2daccf avcodec/sanm: Reset sizes in destroy_buffers()
Fixes crash in 1288a2fe8e9ae6b00ca40e089d08ca65_signal_sigsegv_7ffff71426a7_354_accident.san with allocation limit 65536

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 39bbdebb1e)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Michael Niedermayer
0cb600b7bf avcodec/alac: Clear pointers in allocate_buffers()
Fixes: 06a4edb39ad8a9883175f9bd428334a2_signal_sigsegv_7ffff713351a_706_mov__alac__ALAC_6ch.mov

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit f7068bf277)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Anton Khirnov
c5c141bc69 bytestream2: set the reader to the end when reading more than available
This prevents possible infinite loops with the calling code along the
lines of while (bytestream2_get_bytes_left()) { ... }, where the reader
does not advance.

CC: libav-stable@libav.org
(cherry picked from commit 86eee85dad)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Michael Niedermayer
6c98d5e7c8 avcodec/utils: use a minimum 32pixel width in avcodec_align_dimensions2() for H.264
Fixes Assertion failure
Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7ef6656b1e)

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2015-07-20 04:43:41 +02:00
Michael Niedermayer
27a88f9d45 avcodec/mpegvideo: Clear pointers in ff_mpv_common_init()
This ensures that no stale pointers leak through on any path

Fixes: signal_sigsegv_c3097a_991_xtrem_e2_m64q15_a32sxx.3gp

Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b160fc290c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:41 +02:00
Chris Watkins
77f5302465 oggparsedirac: check return value of init_get_bits
If init_get_bits fails the GetBitContext is invalid and must not be
used. Check the return value in dirac_header and propogate the error.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 4f5c2e651a)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:41 +02:00
Andreas Cadhalpun
6d6ca8b82e wmalosslessdec: reset frame->nb_samples on packet loss
Otherwise a frame with non-zero nb_samples but without any data can be
returned.

Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 42e7a5b3c7)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:41 +02:00
Andreas Cadhalpun
1ca226989c wmalosslessdec: avoid reading 0 bits with get_bits
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit f9020d514e)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:41 +02:00