1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-07-11 14:30:22 +02:00
Commit Graph

70935 Commits

Author SHA1 Message Date
33ec70785f avdevice/lavfi: do not rescale AV_NOPTS_VALUE in lavfi_read_packet()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 913685f552)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
3c7e41df27 libavutil/channel_layout: Correctly return layout when channel specification ends with a trailing 'c'.
Return layout when FF_API_GET_CHANNEL_LAYOUT_COMPAT is set even if the
layout itself is not in the deprecated style.

Signed-off-by: Simon Thelen <ffmpeg-dev@c-14.de>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 83307a32eb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
6b4c6b7ff5 avcodec/jpeg2000dec: Check that coords match before applying ICT
This avoid potential out of array accesses

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
e21db6e339 avformat/ffmdec: Check ffio_set_buf_size() return value
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit dc55477a64)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
e354ec95d6 avcodec/adpcm: Check for overreads
See: vlc ticket 14649
Reported-by: carl
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3c803ed9cb)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
2b31264e1a avcodec/alsdec: Check for overread
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c265763318)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
c2595b4485 avcodec/atrac3plusdec: consume only as many bytes as available
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6b6ae7c3ea)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
c8377cc49b libavutil/softfloat: Fix av_normalize1_sf bias.
av_normalize1_sf doesn't properly address border case when mantis is
exactly -0x40000000.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
ed5bfeca04 swresample/swresample: Cleanup on init failure.
This avoids leaks if the user doest call swr_close() after a failed init

Found-by: James Almer <jamrial@gmail.com>
Reviewed-by: James Almer <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c3f87f7545)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
7050d07562 Revert "avformat/rtpenc: check av_packet_get_side_data() return, fix null ptr dereference"
This was simply wrong

Found-by: Martin Storsjö
This reverts commit 5d8e4f6da0.
(cherry picked from commit 3e34b7498f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
19cef664fe avformat/mxfenc: Accept MXF D-10 with 49.999840 Mbit/sec
This is the maximum rate possible based on the frame size limit of MXF D-10

Previous version reviewed by tim nicholson <nichot20@yahoo.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit d7a762553c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
9d749d69b2 swresample/dither: check memory allocation
check memory allocation in swri_get_dither()

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
d6d328c294 libopenjpegenc: add NULL check for img before accessing it
If opj_image_create fails to allocate an image it returns NULL, which
causes a segmentation fault at 'img->x0 = 0'.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
9591f2fe94 swresample: Check the return value of resampler->init()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 02915602d9)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
b46ae71f29 h264: Make sure reinit failures mark the context as not initialized
(cherry picked from commit 0181ae9af2)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
c40aa4704f avfilter/x86/vf_fspp: Fix invalid combination of opcode and operands
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 5bc2c39527)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
3ea2ffc284 ffmpeg_opt: Set the video VBV parameters only for the video stream from -target
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 2ce6e41911)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
9e3723b848 avcodec/bitstream: Assert that there is enough space left in avpriv_copy_bits()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 291ad5cc9c)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
63716cebb7 avcodec/put_bits: Assert that there is enough space left in skip_put_bytes()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8f5ffed183)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
665b34df73 avcodec/mpegvideo_enc: Update the buffer size as more slices are merged
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 561d3a57aa)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
4947158b1f avcodec/put_bits: Update size_in_bits in set_put_bits_buffer_size()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e4c2ec879b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
308bcf53f9 avformat/wavdec: Increase dts packet threshold to fix more misdetections
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 40a3e1e9c5)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
4db46cf520 avformat/wavdec: Increase probe_packets limit
Fixes DTS detection of b2429e5ba9.dts

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
cb921dd47f nutdec: abort if EOF is reached in decode_info_header/read_sm_data
These loops can take a lot of time if count is very large.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
9c3d306ba4 nutdec: stop skipping bytes at EOF
This can unnecessarily waste a lot of time.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
d4d8c3553d nutdec: fix infinite resync loops
nut->last_syncpoint_pos doesn't necessarily change between resync
attempts, so find_any_startcode can return the same startcode again.

Thus remember where the last resync happened and don't try to resync
before that.

This can't be done locally in nut_read_packet, because this wouldn't
prevent infinite resync loops, where after the resync a packet is
returned and while reading a following packet the resync happens again.

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
bd9313d9f8 avformat/nutdec: Check X in 2nd branch of index reading
Prevents read of uninitialized variable

Based on patch by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit ebb0ca3d70)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:39 +02:00
6270401561 avformat/nutdec: Fix recovery when immedeately after seeking a failure happens
Found-by: Andreas Cadhalpun <andreas.cadhalpun@googlemail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit b3496b4a33)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:38 +02:00
862ba8b4b4 avformat/nutdec: Return error on EOF from get_str()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6bbb2f8f4d)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:38 +02:00
94a3d2e49c rtsp: Make sure we don't write too many transport entries into a fixed-size array
(cherry picked from commit b90adb0aba)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:38 +02:00
4c2a1e673b rtpenc_jpeg: handle case of picture dimensions not dividing by 8
This fixes the calculation of the number of needed blocks to make
sure that ALL pixels are represented by the result.

Reviewed-by: Thomas Volkert <silvo@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7f64a7503b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:38 +02:00
3bb17d2692 avcodec/golomb: get_ur_golomb_jpegls: Fix reading huge k values
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c720b9ce98)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-07-20 04:43:38 +02:00
a5e18e900f avformat/swfdec: Do not error out on pixel format changes
Instead print an error and continue

Fixes Ticket4702

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 6a1204a1a4)
2015-07-08 12:42:36 +02:00
8c5d196f50 avformat/mov: Mark avio context of decompressed atoms as seekable
Fixes Ticket4329

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 8ce564ea28)
2015-06-19 10:57:07 +02:00
678a189e5d avcodec/mjpegenc_common: Use ff_mpv_reallocate_putbitbuffer()
Fixes assertion failure
Fixes Ticket4396

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit c50904fd78)
2015-06-19 10:55:06 +02:00
e2054a8b55 avcodec/mpegvideo: Factor ff_mpv_reallocate_putbitbuffer() out
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 00f3bb2ef2)
2015-06-19 10:55:02 +02:00
ecd3cce0ec avfilter/x86/vf_hqdn3d: Fix register types
Fixes Ticket4301

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 52fc3e372f)
2015-06-19 10:52:35 +02:00
81d923f14b avcodec/exr: fix crash caused by merge
Various header informations need to be reset when decoding next frame.
Regression since: 95582b5c

Fixes ticket #4597.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit a03b69478b)
2015-06-19 10:37:30 +02:00
a6bdfd9b46 avcodec/x86/h264_weight: handle weight1=128
Fix ticket4596

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit e100966575)
2015-06-19 10:34:33 +02:00
df408d213a avcodec/dvbsubdec: Fix buf_size check in dvbsub_parse_display_definition_segment()
Fixes Ticket4326

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit debf4d6e67)
2015-06-19 10:32:20 +02:00
7e5a298bce avcodec/hevc_ps: Only discard overread VPS if a previous is available
Fixes Ticket4621

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 57078e4d25)
2015-06-19 10:27:32 +02:00
d9dd0cbe63 avcodec/flacenc: Fix Invalid Rice order
Fixes ticket #4628.

The problem arose, in the sample file at least, in the last block where the
minimum and maximum Rice partition orders were both 0. In that case, and any
other where pmax == pmin, the original UINT32_MAX placeholder value for
bits[opt_porder] was getting overwritten before the comparison to check if the
current partition order is a new optimal, so the correct partition order and
RiceContext params were not being set.

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

Conflicts:
	libavcodec/flacenc.c
2015-06-19 10:26:41 +02:00
1f7343c814 lavd/xcbgrab: fix comparison with screen size.
Signed-off-by: Nicolas George <george@nsup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 7971fa9ce0)
2015-05-19 11:29:26 +02:00
af5917698b avformat/avidec: add mp2 to the list of exceptions instead of generally treating dshow_block_align==1 special
Fixes Ticket4552

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
n2.6.3
2015-05-17 02:16:39 +02:00
b58cbb07bc avformat/mov: Fix parsing short loci
Fixes Ticket4557

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-16 21:36:48 +02:00
dd9789ab6d avformat/mov: Print reason of loci parsing failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9e4f0cfc8f)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-16 21:36:36 +02:00
aded27a30b Update for 2.6.3
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-16 00:41:10 +02:00
a1f68d9518 avcodec/hevc: Fix typo in num_entry_point_offsets check
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 3051e7fa71)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-15 23:56:52 +02:00
2612b69d3f avcodec/libtheoraenc: Check for av_malloc failure
Fixes CID1257799

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-15 23:55:29 +02:00
88217c40b6 avcodec/dcadec: Check active_bands
Fixes CID1297594 part2

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

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-05-15 20:40:26 +02:00