1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

85152 Commits

Author SHA1 Message Date
Michael Niedermayer
b1fc2c5c25 avcodec/indeo2: Check remaining bits in ir2_decode_plane()
Fixes: 1290/clusterfuzz-testcase-minimized-5815578902134784
Fixes: timeout

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b29feec9829cfab2523c8d95e35bd69e689ea4af)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-14 00:21:49 +02:00
Michael Niedermayer
b6a4aeb2f6 avcodec/vp3: Check remaining bits in unpack_dct_coeffs()
Decreases the time spend decoding junk.

May fix: 1283/clusterfuzz-testcase-minimized-6221126759874560

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 2f00300b779e7b247c85db0d7daef448225105ff)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-14 00:21:49 +02:00
Michael Niedermayer
0875b2651d doc/developer: Add terse documentation of assumed C implementation defined behavior
Suggested-by: "Ronald S. Bultje" <rsbultje@gmail.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit b706ddbae3f4a11c58560b914807931556108b55)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-14 00:21:49 +02:00
Michael Niedermayer
681ca7ecd0 avcodec/bmp: Use ff_set_dimensions()
Fixes out of memory

Fixes: 1282/clusterfuzz-testcase-minimized-5400131681648640

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 63b8d4146d78595638417e431ea390aaf01f560f)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-14 00:21:49 +02:00
Michael Niedermayer
51f24cb3f5 avcodec/mdec: Fix runtime error: left shift of negative value -127
Fixes undefined behavior
Fixes: 1275/clusterfuzz-testcase-minimized-6718162017976320

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 6ca82975b7a8eaf676a52738ec8e7e36732327cc)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-14 00:21:49 +02:00
Michael Niedermayer
87dcc7502d avcodec/x86/vc1dsp_init: Fix build failure with --disable-optimizations and clang
compilers doing DCE at -O0 do not necessarily understand "complex" boolean expressions
Build succeeds with this change, this was the only failure

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit fa8fd0808f1086fc85abba5cf123faf41da49305)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-14 00:21:49 +02:00
Martin Vignali
3ffde707df libavcodec/exr : fix float to uint16 conversion for negative float value
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e46d63745215c04637e7797228bad36bce49d881)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-14 00:21:49 +02:00
Derek Buitenhuis
2ff9e21f7f avformat/webmdashenc: Validate the 'streams' adaptation sets parameter
It should not be a value larger than the number of streams we have,
or it will cause invalid reads and/or SIGSEGV.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ec07efa70012845e8642df67a4a773f510a17088)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-14 00:21:49 +02:00
Derek Buitenhuis
9eb0d76e25 avformat/webmdashenc: Require the 'adaptation_sets' option to be set
This seems to be non-optional, and if the muxer is run without it,
strlen() is run on NULL, causing a segfault.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit cbd3a68f3e1c2d1679370301eb5e1a32a2df64fe)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-05-14 00:21:49 +02:00
Marton Balint
508e410d34 lavfi/avfiltergraph: only return EOF in avfilter_graph_request_oldest if all sinks EOFed
Fixes a regression introduced in 32c59a115d3cc757676b5384a5ea44b5a7a7b872,
becoming effective in 912969a33e313c57c906e87a7e2367b78a2160f4.

Fixes trimmed output of
ffmpeg -f lavfi -i "sine=d=0.01" -f lavfi -i "sine=d=1" -filter_complex "[0:a]anull[a1];[1:a]anull[a2]" -map "[a1]" -f null none -map "[a2]" -f framecrc -

Reviewed-by: Nicolas George <george@nsup.org>
Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit c0443c1af1a772daf33731da7262f3aa6b28dc8e)
2017-05-07 19:53:46 +02:00
wm4
059db22040 ffmpeg: check for unconnected outputs
Fixes e.g.:

ffmpeg -f lavfi -i testsrc -f lavfi -i testsrc -filter_complex "[0:v][1:v]psnr[out]" -f null none

Fixes ticket .

(cherry picked from commit 974ee16d6a71c31d0b5db4f139a40831c2f45776)
2017-05-07 19:52:00 +02:00
Aaron Levinson
329176adc5 avformat/utils: free AVStream.codec properly in free_stream()
Fixes memory leaks.

Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit b9d2005ea5d6837917a69bc2b8e98f5695f54e39)
2017-05-06 17:30:18 -03:00
James Almer
8119efdbec avcodec/options: do a more thorough clean up in avcodec_copy_context()
Free coded_frame, coded_side_data and unref hw_device_ctx to prevent
potential leaks.

Reviewed-by: Aaron Levinson <alevinsn@aracnet.com>
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit cac8de2da5c4935773128335c11b806faa73e19d)
2017-05-06 17:30:07 -03:00
James Almer
4f19268eee avcodec/options: factorize avcodec_copy_context() cleanup code
Reviewed-by: Aaron Levinson <alevinsn@aracnet.com>
Tested-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit 54a4c9b4e9a1524b1ac5d2be97c8042272402d0a)
2017-05-06 17:29:59 -03:00
Muhammad Faiz
58a8e4733a ffmpeg: count packets when queued
Because write_packet() fakely writes packets to muxer by queueing
them when muxer hasn't been initialized, it should also increment
frame_number fakely.
This is required because code in do_streamcopy() rely on
frame_number.

Should fix Ticket6227

Reviewed-by: James Almer <jamrial@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
(cherry picked from commit c4be288fdbe1993110f1abd28ea57587cb2bc221)
2017-05-02 16:42:36 -03:00
James Almer
cfca0b9139 avformat/concatdec: fix the h264 annexb extradata check
The start code can be either in the first three or four bytes.

(cherry picked from commit b4330a0e02fcbef61d630a369abe5f4421ced659)
2017-04-26 21:50:02 -03:00
Paul B Mahol
da693f8daa avcodec/dnxhd_parser: fix parsing interlaced video, simplify code
There appears to be no need to treat interlaced videos differently,
also that code is flawed, as for at least one input cur_field would
be always 0.

Fixes ticket .

Signed-off-by: Paul B Mahol <onemda@gmail.com>
(cherry picked from commit ac30754a148df58822a272555d1f6f860e42037e)
2017-04-25 00:29:37 +02:00
Marton Balint
ed2ed4ac0f ffmpeg; check return code of avcodec_send_frame when flushing encoders
Fixes Coverity CID 1404841.

Signed-off-by: Marton Balint <cus@passwd.hu>
(cherry picked from commit c037f2f1ba3a2d3114575323550f456e66695edf)
2017-04-22 23:17:22 +02:00
Ronald S. Bultje
1968a1eef1 pthread_frame: make accesses to debug field be protected by owner lock.
The av_log() is done outside the lock, but this way the accesses to the
field (reads and writes) are always protected by a mutex. The av_log()
is not run inside the lock context because it may involve user callbacks
and doing that in performance-sensitive code is probably not a good idea.

This should fix occasional tsan warnings when running fate-h264, like:

WARNING: ThreadSanitizer: data race (pid=10916)
  Write of size 4 at 0x7d64000174fc by main thread (mutexes: write M2313):
     update_context_from_user src/libavcodec/pthread_frame.c:335 (ffmpeg+0x000000df7b06)
[..]
  Previous read of size 4 at 0x7d64000174fc by thread T1 (mutexes: write M2311):
     ff_thread_await_progress src/libavcodec/pthread_frame.c:592 (ffmpeg+0x000000df8b3e)

(cherry picked from commit 2e664b9c1e73c80aab91070c1eb7676f04bdd12d)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
n3.3
2017-04-13 02:29:26 +02:00
Ronald S. Bultje
f4f3bf3c94 pthread_frame: allow per-field ThreadFrame owners.
This tries to handle cases where separate invocations of decode_frame()
(each running in separate threads) write to respective fields in the
same AVFrame->data[]. Having per-field owners makes interaction between
readers (the referencing thread) and writers (the decoding thread)
slightly more optimal if both accesses are field-based, since they will
use the respective producer's thread objects (mutex/cond) instead of
sharing the thread objects of the first field's producer.

In practice, this fixes the following tsan-warning in fate-h264:

WARNING: ThreadSanitizer: data race (pid=21615)
  Read of size 4 at 0x7d640000d9fc by thread T2 (mutexes: write M1006):
     ff_thread_report_progress pthread_frame.c:569 (ffmpeg:x86_64+0x100f7cf54)
[..]
  Previous write of size 4 at 0x7d640000d9fc by main thread (mutexes: write M1004):
     update_context_from_user pthread_frame.c:335 (ffmpeg:x86_64+0x100f81abb)

(cherry picked from commit 083300bea935d125b83f60d7030f78a7ffb0f3df)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-13 02:29:26 +02:00
Ronald S. Bultje
6557ea8e2b vp8: make mv_min/max thread-local if using partition threading.
Fixes tsan warnings like this in fate-vp8-test-vector-007:

WARNING: ThreadSanitizer: data race (pid=65909)
  Write of size 4 at 0x7d8c0000e088 by thread T1:
     vp8_decode_mb_row_sliced vp8.c:2519 (ffmpeg:x86_64+0x100995ede)
[..]
  Previous write of size 4 at 0x7d8c0000e088 by thread T2:
     vp8_decode_mb_row_sliced vp8.c:2519 (ffmpeg:x86_64+0x100995ede)

(cherry picked from commit fed92adbb3fc6cbf735e3df9a2f7d0a2917fcfbd)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-13 02:29:26 +02:00
Ronald S. Bultje
9d742f774a vp8: make wait/thread_mb_pos atomic.
Fixes tsan warnings like this in fate-vp8-test-vector-007:

WARNING: ThreadSanitizer: data race (pid=3590)
  Write of size 4 at 0x7d8c0000e07c by thread T2:
     decode_mb_row_no_filter src/libavcodec/vp8.c:2330 (ffmpeg+0x000000ffb59e)
[..]
  Previous write of size 4 at 0x7d8c0000e07c by thread T1:
     decode_mb_row_no_filter src/libavcodec/vp8.c:2330 (ffmpeg+0x000000ffb59e)

(cherry picked from commit 9a54c6f243412f62bae498ddcac337cb18ae6290)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-13 02:29:26 +02:00
Ronald S. Bultje
5e84c94f69 huffyuv: assign correct per-thread avctx pointer to HYuvContext::avctx.
Fixes the following tsan warning when running fate-vsynth_lena-ffvhuff:

WARNING: ThreadSanitizer: data race (pid=6484)
  Write of size 8 at 0x7d64000154b8 by main thread (mutexes: write M1331):
     update_context_from_user src/libavcodec/pthread_frame.c:331 (ffmpeg+0x000000dca887)
[..]
  Previous read of size 8 at 0x7d64000154b8 by thread T2 (mutexes: write M1334):
     draw_slice src/libavcodec/huffyuvdec.c:857 (ffmpeg+0x000000bcc86f)

(cherry picked from commit 7c7e7c44a6eb68eca861e45cb2ce78f582b12c69)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-13 02:29:26 +02:00
Ronald S. Bultje
e90de50195 png: set AVFrame flags/fields before calling setup_finished().
Fixes tsan warnings in fate-apng:

WARNING: ThreadSanitizer: data race (pid=51230)
  Read of size 4 at 0x7d50000042fc by main thread (mutexes: write M1000):
     frame_copy_props frame.c:302 (ffmpeg:x86_64+0x1019a35d6)
[..]
  Previous write of size 4 at 0x7d50000042fc by thread T1 (mutexes: write M997):
     decode_idat_chunk pngdec.c:708 (ffmpeg:x86_64+0x100f5562a)

(cherry picked from commit eff2861a757b8a46398e6fcb844b960b4775daad)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-13 02:29:26 +02:00
Ronald S. Bultje
51ca6fda05 png: split header state and data state in two separate variables.
Fixes a reported (but false) race condition in tsan for fate-apng:

WARNING: ThreadSanitizer: data race (pid=6274)
  Read of size 4 at 0x7d680001ec78 by main thread (mutexes: write M1338):
     update_thread_context src/libavcodec/pngdec.c:1456 (ffmpeg+0x000000dacf0c)
[..]
  Previous write of size 4 at 0x7d680001ec78 by thread T1 (mutexes: write M1335):
     decode_idat_chunk src/libavcodec/pngdec.c:737 (ffmpeg+0x000000dae951)

(cherry picked from commit 478f1c3d5e5463a284ea7efecfc62d47ba3be11a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-13 02:29:26 +02:00
Ronald S. Bultje
d1cae50a04 hevc: only write to max_ra and pocTid0 in the first slice.
Values from subsequent values are guaranteed to be identical (since
poc and nal_unit_type are checked to be the same between slices), so
this doesn't affect output in any way, but does resolve the remaining
reported race conditions (by tsan) in fate-hevc.

In practice, this fixes tsan warnings like this:

WARNING: ThreadSanitizer: data race (pid=25334)
  Read of size 4 at 0x7d9c0001adcc by main thread (mutexes: write M1386):
     hevc_update_thread_context src/libavcodec/hevcdec.c:3310 (ffmpeg+0x000000b41c7c)
[..]
  Previous write of size 4 at 0x7d9c0001adcc by thread T1 (mutexes: write M1383):
     hls_slice_header src/libavcodec/hevcdec.c:596 (ffmpeg+0x000000b43a22)

(cherry picked from commit 1f50baa2b2da7fdbfccf0662883f38a763ff6619)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-13 02:29:26 +02:00
Ronald S. Bultje
b51217381d pthread_frame: call update_context_from_user() after acquiring lock.
Otherwise the thread may still be in the middle of decoding a previous
frame, which would effectively trigger a race condition on any field
concurrently read and written.

In practice, this fixes tsan warnings like the following:

WARNING: ThreadSanitizer: data race (pid=17380)
  Write of size 4 at 0x7d64000160fc by main thread:
     update_context_from_user src/libavcodec/pthread_frame.c:335 (ffmpeg+0x000000dca515)
[..]
  Previous read of size 4 at 0x7d64000160fc by thread T2 (mutexes: write M1821):
     ff_thread_report_progress src/libavcodec/pthread_frame.c:565 (ffmpeg+0x000000dcb08a)

(cherry picked from commit 1269cd5b6f540bef5913bf134d2f461aac50d70b)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-13 02:29:26 +02:00
Ronald S. Bultje
f5f0b2f44c ffmpeg: make transcode_init_done atomic.
Should fix tsan warnings in fate-fifo-muxer-h264/wav:

WARNING: ThreadSanitizer: data race (pid=26552)
  Write of size 4 at 0x000001e0d7c0 by main thread:
     transcode_init src/ffmpeg.c:3761 (ffmpeg+0x00000050ca1c)
[..]
  Previous read of size 4 at 0x000001e0d7c0 by thread T1:
     decode_interrupt_cb src/ffmpeg.c:460 (ffmpeg+0x0000004fde19)

(cherry picked from commit 76d8c77430e9e0110623705bfb54d922cc2ac3ea)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-13 02:29:26 +02:00
Ronald S. Bultje
e9fc7a90ba h264: don't sync pic_id between threads.
This is how the ref list manager links bitstream IDs to H264Picture/Ref
objects, and is local to the producer thread. There is no need for the
consumer thread to know the bitstream IDs of its references in their
respective producer threads.

In practice, this fixes tsan warnings when running fate-h264:

WARNING: ThreadSanitizer: data race (pid=19295)
  Read of size 4 at 0x7dbc0000e614 by main thread (mutexes: write M1914):
     ff_h264_ref_picture src/libavcodec/h264_picture.c:112 (ffmpeg+0x0000013b3709)
[..]
  Previous write of size 4 at 0x7dbc0000e614 by thread T2 (mutexes: write M1917):
     build_def_list src/libavcodec/h264_refs.c:91 (ffmpeg+0x0000013b46cf)

(cherry picked from commit e72690b18da064f6c0f04f09ccde72b6636e3159)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-13 02:29:26 +02:00
Ronald S. Bultje
414d11fff6 h264: don't re-call ff_h264_direct_ref_list_init() w/ frame-mt.
I'm hoping that this will address the remaining tsan fate-h264 issues:

WARNING: ThreadSanitizer: data race (pid=24478)
  Read of size 8 at 0x7dbc0001c828 by main thread (mutexes: write M3243):
     ff_h264_ref_picture src/libavcodec/h264_picture.c:107 (ffmpeg+0x0000013b78d8)
[..]
  Previous write of size 1 at 0x7dbc0001c82e by thread T2 (mutexes: write M3245):
     ff_h264_direct_ref_list_init src/libavcodec/h264_direct.c:137 (ffmpeg+0x000001382c93)

But I'm not sure because I haven't been able to reproduce locally.

(cherry picked from commit 7f05c5cea04112471d8147487aa3b44141922d09)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-13 02:29:26 +02:00
James Almer
1830b0a6c7 avformat/movenc: auto insert vp9_superframe bsf when needed
Experimental VP9 support was added to the muxer recently.

Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
(cherry picked from commit d36a3f5a78bb1e15bbaffc7b92dbeb6a50c28ca9)
2017-04-12 20:53:55 -03:00
Carl Eugen Hoyos
0ed4f26cf2 configure: Fix decklink license dependency.
(cherry picked from commit a081acc44082e4124a11747139b9a329fe01736e)
2017-04-12 22:51:03 +02:00
Marton Balint
69e35db80d ffprobe: only use custom logging callback if -show_log is set
The custom callback can cause significant CPU usage on Windows for some large
files with many index entries for some reason.

v2: Move check after parsing options.

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-04-12 21:09:32 +02:00
Marton Balint
af43c7092c tests/fate/filter-video: fix framerate filter tests
Signed-off-by: Marton Balint <cus@passwd.hu>
2017-04-12 21:09:18 +02:00
Marton Balint
ecdf52745f avfilter/vf_framerate: always request input if no output is provided in request_frame
Fixes ticket .

Signed-off-by: Marton Balint <cus@passwd.hu>
2017-04-12 21:08:45 +02:00
Michael Niedermayer
07e7ebf52d add release notes based on release 3.2
Name suggestion was from Tobias Rapp and Bodecs Bela

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-12 03:12:19 +02:00
Michael Niedermayer
37589e6443 Update for 3.3
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-12 02:24:58 +02:00
Michael Niedermayer
ad37fb86d7 doc/APIchanges: Fill in missing fields
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 5b441d2981f35e6183b0ac29fa89e089c91cf7ba)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-12 02:22:51 +02:00
Michael Niedermayer
4f325589f9 avformat/oggparseogm: Check ff_alloc_extradata() for failure
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 9eff4b0d2b5013e1ede86cf1a152dce164217d52)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-11 23:39:21 +02:00
Michael Niedermayer
707d4c7fb5 avformat/oggparseogm: Check available data before reading global header
Fixes use of uninitialized data

Found-by: Thomas Guilbert <tguilbert@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 170d864d2c508ca8111b1d108e1e964007dab712)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-11 23:39:21 +02:00
Michael Niedermayer
c30d0ace65 avcodec/pixlet: Reorder rlen check
This changes nothing but is nicer looking as this checks rlen

Maybe this helps coverity remove CID1397743

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c94d551ea7b39c4e467e146cd347c407e8eb38ee)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-11 23:39:21 +02:00
Michael Niedermayer
0c188bc595 avcodec/mjpegenc_huffman: Assert length in ff_mjpegenc_huffman_compute_bits()
This should help coverity see that the issues this leads to cannot occur

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8dd0c12648d838bb982ca10f384ee1f0107dfece)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-11 23:39:21 +02:00
Rostislav Pehlivanov
72e038acaf mpegvideo_enc: disable optimized huffman coding with AMV or slice threads
Doesn't work yet with slice threading and won't work with AMV.

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 03eb0515c12637dbd20c2e3ca8503d7b47cf583a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-11 23:39:21 +02:00
Michael Niedermayer
83e6a4a32b Revert "mjpegenc: disable huffman coding with AMV"
This was the wrong patch

This reverts commit 7f9b492d544ccef36f1d5d97a76d22502623d3c8.

(cherry picked from commit 724bb805ef8a6de0d9ef27a083ef501bdef2d453)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-11 23:39:21 +02:00
Michael Niedermayer
7182fbc471 doc/examples/decode_video: Fix format string vulnerability
Fixes: CID1404843

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 23edd41a0d6994cb5d9983d8f035e8eef78960ad)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-11 23:39:21 +02:00
Steven Liu
0b4d87fad1 Revert "avutil/avstring: add av_strreplace API into avstring"
This reverts commit 99e5d81ef997cb88b1a40e6f253f37f7cbf251d9.
2017-04-11 08:05:54 +08:00
Rostislav Pehlivanov
7034009f62 mjpegenc: disable huffman coding with AMV
Isn't supported.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
(cherry picked from commit 7f9b492d544ccef36f1d5d97a76d22502623d3c8)
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-04-09 00:02:46 +01:00
Rostislav Pehlivanov
6c9574e490 mjpegenc_common: check for codec ID before using avctx->priv_data
When coding lossless jpeg the priv context will be pointing to LJpegEncContext
rather than MpegEncContext, which the function expects.

Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
(cherry picked from commit 2c9be3882a03823413945bd9e2d9af33e6e322d5)
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
2017-04-09 00:02:12 +01:00
James Almer
37fcf089b4 avformat/matroskaenc: don't try to update flac extradata if live streaming
(cherry picked from commit a8b5f375010912abd9d41bde0992c63a548d56a6)
2017-04-08 17:44:42 -03:00
Michael Niedermayer
f4400a92f5 avformat/mov: Check creation_time for overflow
Fixes integer overflow
Fixes: 701640

Found-by: Found-by: Thomas Guilbert <tguilbert@google.com>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 39ee3ddff87a12e108fc4e0d36f756d0ca080472)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
2017-04-08 22:31:05 +02:00