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>
This complex (-1 2 6 2 -1) filter slightly less reduces interlace 'twitter' but better retain detail and subjective sharpness impression compared to the linear (1 2 1) filter.
Signed-off-by: Thomas Mundt <tmundt75@gmail.com>
Signed-off-by: James Almer <jamrial@gmail.com>
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>
the tested sample contain negative value in the red channel
need to be clip to zero, and not set to MAX_RED
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* commit 'c2fa6bb0e8703a7a6aa10e11f9ab36094416d83f':
mpeg12dec: move setting first_field to mpeg_field_start()
This commit is a noop, see 2f6f2f4f73c068979829e785d08cb1dd345c7fc8
Merged-by: James Almer <jamrial@gmail.com>
So, all frames and errors are correctly reported in order.
Also limit the numbers of error during draining to prevent infinite loop.
This fix fate failure with THREADS>=4:
make fate-h264-attachment-631 THREADS=4
This also reverts a755b725ec1d657609c8bd726ce37e7cf193d03f.
Suggested-by: wm4, Ronald S. Bultje, Marton Balint
Reviewed-by: w4 <nfxjfg@googlemail.com>
Reviewed-by: Ronald S. Bultje <rsbultje@gmail.com>
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Muhammad Faiz <mfcc64@gmail.com>
* commit 'e807491fc6a336e4becc0cbc981274a8fde18aba':
mpeg12dec: avoid signed overflow in bitrate calculation
mpegvideo_parser: avoid signed overflow in bitrate calculation
This merge is a noop.
2017-04-29 12:54:15 @ubitux michaelni: is 740959fdbfbf804ccd8a6e426b1b1ba321fe5cfb enough to fix the overflow fixed in 58405de0951a843765625159402870c1eea3c3b1?
2017-04-29 12:55:53 @ubitux same question with e807491fc6a336e4becc0cbc981274a8fde18aba
2017-04-29 13:21:45 michaelni ubitux, the libav code refered to is wrong for us and i doubt the problem it fixes applies to us.
2017-04-29 13:24:29 @ubitux michaelni: ok, for both commits?
2017-04-29 13:33:55 michaelni yes, they do more or less the same thing
Merged-by: Clément Bœsch <u@pkh.me>
* commit 'cfa4eb4fba782f3f37a33be997b27a91a07053c9':
vaapi_decode: use the correct logging context
This commit is a noop, see 79307ae56374b35cf12563a7c8e3e759658f847e
Merged-by: Clément Bœsch <u@pkh.me>
* commit 'ea8b730d8e67152107d7fcdd5590bbb51ec236b1':
hevcdec: add a VAAPI hwaccel
This commit is a noop, see adb54e59c18db347f39e55832104fc3e40a3c42b
Merged-by: Clément Bœsch <u@pkh.me>
find_fps attempts to infer framerate from AVCodec's timebase. When this
results in a frame rate that isn't explicitly marked as supported in
av_timecode_check_frame_rate, find_fps returns the AVStream's
avg_frame_rate, which, per avformat.h, _may_ be set (or not).
mov_get_mpeg2_xdcam_codec_tag, mov_get_h264_codec_tag and
find_compressor attempt to call av_q2d on the return value of find_fps,
which in the above case, may result in division by zero and therefore,
an undefined frame rate when NaN is converted to int.
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
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>
Most code between the 2 functions was duplicated which made keeping
both in sync difficult.
This also fixes some discovered issues with encoding (incorrect
TF switching buffers) and reduces stack usage (reuse the already
allocated CeltFrame->scratch buffer for the quantized coefficients).
Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>