summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lavc/j2kenc: Support AV_PIX_FMT_PAL8.Carl Eugen Hoyos2018-05-252-5/+37
|
* lavf/img2dec: Auto-detect xwd images.Carl Eugen Hoyos2018-05-254-1/+35
|
* doc/codecs: Remove option sc_factor.Carl Eugen Hoyos2018-05-241-4/+0
| | | | | Fixes ticket #7228. The option was disabled since 4a62f477 and removed in 6e69525e.
* avformat/hlsenc: support http method for hls fmp4Steven Liu2018-05-241-1/+3
| | | | | | fix ticket: 7160 Signed-off-by: Steven Liu <[email protected]>
* avformat/dashdec: replace user-agent to user_agent for deprecate warning messageSteven Liu2018-05-241-3/+3
|
* avformat/dashdec: Fix for ticket 7149 (Segfault when decoding dash streams)Colin NG2018-05-241-36/+10
| | | | simplify the code to check common init section
* avformat/dashdec: Fix for ticket 7149 (Segfault when decoding dash streams)Colin NG2018-05-241-7/+23
| | | | Add NULL pointer check for init_section
* hwcontext_vaapi: Fix mapping from DRMMark Thompson2018-05-241-1/+3
| | | | | This was broken by bed670a1de29b58fcb3fe046562d8bd125b1457f, which added an assert that always failed.
* avformat/mov: replace a value error by clipping into valid range in ↵Michael Niedermayer2018-05-221-3/+11
| | | | | | | | mov_read_stsc() Fixes: #7165 Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/bintext: Reduce detection for random .bin files as it more likely ↵Michael Niedermayer2018-05-221-1/+1
| | | | | | is not a multimedia related file Signed-off-by: Michael Niedermayer <[email protected]>
* lavc/jpeg2000dec: Move a variable declaration closer to its usage.Carl Eugen Hoyos2018-05-221-1/+1
|
* lavc/jpeg2000dec: Use a define to clarify the meaning of a constant.Carl Eugen Hoyos2018-05-221-1/+1
|
* lavc/h264_parse: Remove a superfluous linebreak.Carl Eugen Hoyos2018-05-221-1/+1
|
* libavformat: add mbedTLS based TLSThomas Volkert2018-05-217-9/+435
| | | | Signed-off-by: James Almer <[email protected]>
* avcodec/libvpxenc: fix setting amount of threads used for encodingJames Almer2018-05-211-1/+1
| | | | | | | | | | | | The libvpx doxy says that a value of 0 for the g_threads field is equivalent to a value of 1, whereas for avctx->thread_count it means the maximum amount of threads possible for the host system. Use av_cpu_count() to get the correct thread count when auto threads is requested. Reviewed-by: James Zern <[email protected]> Signed-off-by: James Almer <[email protected]>
* hwcontext: Add test for device creation and derivationMark Thompson2018-05-215-0/+239
| | | | | | This uses any devices it can find on the host system - on a system with no hardware device support or in builds with no support included it will do nothing and pass.
* avformat/mpegts: fix memory leak with merge_pmt_versions=1Aman Gupta2018-05-211-2/+5
| | | | Signed-off-by: Aman Gupta <[email protected]>
* doc: remove AVStream private fields from APIchangesAman Gupta2018-05-211-1/+0
| | | | Signed-off-by: Aman Gupta <[email protected]>
* avformat/mpegts: rename variable to clarify meaningAman Gupta2018-05-211-8/+8
| | | | | | | | Both stream_id and stream_identifier are used in this file, and have different meanings. The latter comes from the stream_identifier_descriptor. Signed-off-by: Aman Gupta <[email protected]>
* avformat/mov: Only fail for STCO/STSC contradictions if both existMichael Niedermayer2018-05-211-1/+1
| | | | | | | | Fixes regression with playback of GF9720Repeal20the20Eighth20with20Helen20Linehan.m4a See: crbug 822666 Found-by: "Mattias Wadman <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/mov: Break out early if chunk_count is 0 in mov_build_index()Michael Niedermayer2018-05-211-0/+3
| | | | | | | | | Without this some operations might overflow (undefined behavior) even though the index adding loop would never execute No testcase known Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/vc1: FIELDTX is only present in interlaced frame I/BI picturesJerome Borsboom2018-05-201-1/+2
| | | | | | | | If v->fieldtx_is_raw is not reset to zero, it may spill over from a previous interlaced frame I/BI picture. Signed-off-by: Jerome Borsboom <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/mp3dec: require 90% of a file to be mp3 if only 1 mp3 frame is ↵Michael Niedermayer2018-05-201-1/+1
| | | | | | | | found in sequence This eliminates several low score detections of non mp3 files Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/mp3dec: Require 50% of the file to be mp3 frames in the ↵Michael Niedermayer2018-05-201-1/+1
| | | | | | | | maxframes>200 probing test This corrects several misdetections of large files Signed-off-by: Michael Niedermayer <[email protected]>
* avformat/mp3dec: Require probing data to be 50% mp3 frames for low score ↵Michael Niedermayer2018-05-201-3/+7
| | | | | | | | | probing to succeed This massively reduces the detection of random data as low score mp3 It may improve security by making it harder to read non multimedia data Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/vc1: fix calculation of the last line of a sliceJerome Borsboom2018-05-201-1/+1
| | | | | | | | Only for the last slice of the first field is the last line of the slice equal to the height of the field. Signed-off-by: Jerome Borsboom <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/vc1: DIRECTBIT is only present in inter MBsJerome Borsboom2018-05-201-35/+36
| | | | | | | | | DIRECTBIT was decoded before the intra/inter MB branching when decoding interlace frame B pictures. Resulting in mistakenly also decoding it for intra MBs where this syntax element is not present. Signed-off-by: Jerome Borsboom <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* avdevice/sdl2 : add option to define if the window quit action is availableMartin Vignali2018-05-192-1/+8
|
* avdevice/sdl2output : fix setting window_sizeMartin Vignali2018-05-191-4/+2
|
* avformat/mpegts: add merge_pmt_versions optionAman Gupta2018-05-184-3/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new optional flag makes it easier to deal with mpegts samples where the PMT is updated and elementary streams move to different PIDs in the middle of playback. Previously, new AVStreams were created per PID, and it was up to the user to figure out which streams had migrated to a new PID (by iterating over the list of AVProgram and making guesses), and switch seamlessly to the new AVStream during playback. Transcoding or remuxing these streams with ffmpeg on the CLI was also quite painful, and the user would need to extract each set of PIDs into a separate file and then stitch them back together. With this new option, the mpegts demuxer will automatically detect PMT changes and feed data from the new PID to the original AVStream that was created for the orignal PID. For mpegts samples with stream_identifier_descriptor available, the unique ID is used to merge PIDs together. If the stream id is not available, the demuxer attempts to map PIDs based on their position within the PMT. With this change, I am able to playback and transcode/remux these two samples which previously caused issues: https://tmm1.s3.amazonaws.com/pmt-version-change.ts https://kuroko.fushizen.eu/videos/pid_switch_sample.ts I also have another longer sample in which the PMT changes repeatedly and ES streams move to different pids three times during playback: https://tmm1.s3.amazonaws.com/multiple-pmt-change.ts Demuxing this sample with the new option shows several new log messages as the PMT changes are handled: [mpegts] detected PMT change (program=1, version=3/6, pcr_pid=0xf98/0xfb7) [mpegts] re-using existing video stream 0 (pid=0xf98) for new pid=0xfb7 [mpegts] re-using existing audio stream 1 (pid=0xf99) for new pid=0xfb8 [mpegts] re-using existing audio stream 2 (pid=0xf9a) for new pid=0xfb9 [mpegts] detected PMT change (program=1, version=6/3, pcr_pid=0xfb7/0xf98) [mpegts] detected PMT change (program=1, version=3/4, pcr_pid=0xf98/0xf9b) [mpegts] re-using existing video stream 0 (pid=0xf98) for new pid=0xf9b [mpegts] re-using existing audio stream 1 (pid=0xf99) for new pid=0xf9c [mpegts] re-using existing audio stream 2 (pid=0xf9a) for new pid=0xf9d [mpegts] detected PMT change (program=1, version=4/5, pcr_pid=0xf9b/0xfa9) [mpegts] re-using existing video stream 0 (pid=0xf98) for new pid=0xfa9 [mpegts] re-using existing audio stream 1 (pid=0xf99) for new pid=0xfaa [mpegts] re-using existing audio stream 2 (pid=0xf9a) for new pid=0xfab [mpegts] detected PMT change (program=1, version=5/6, pcr_pid=0xfa9/0xfb7) Signed-off-by: Aman Gupta <[email protected]>
* avformat/mpegts: keep track of PMT details in AVProgram/AVStreamAman Gupta2018-05-181-5/+25
| | | | | | | | | | | | | | | | | | | With these fields, the user has enough information to detect PMT changes and switch to new streams when the PMT is updated with new ES pids. To do so, the user would monitor the AVProgram they're interested in for changes to pmt_version. If the version changes, they would iterate over the program's streams to find new streams added with the updated version number. If new versions of streams are found, then the user would first try to replace existing streams where stream_identifier matched. If stream_identifier is not available, then the user would compare pmt_stream_idx instead to replace the stream that was previously at the same position within the PMT. Signed-off-by: Aman Gupta <[email protected]>
* avformat: add fields to AVProgram/AVStream for PMT change trackingAman Gupta2018-05-184-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | These fields will allow the mpegts demuxer to expose details about the PMT/program which created the AVProgram and its AVStreams. In mpegts, a PMT which advertises streams has a version number which can be incremented at any time. When the version changes, the pids which correspond to each of it's streams can also change. Since ffmpeg creates a new AVStream per pid by default, an API user needs the ability to (a) detect when the PMT changed, and (b) tell which AVStream were added to replace earlier streams. This has been a long-standing issue with ffmpeg's handling of mpegts streams with PMT changes, and I found two related patches in the wild that attempt to solve the same problem: The first is in MythTV's ffmpeg fork, where they added a void (*streams_changed)(void*); to AVFormatContext and call it from their fork of the mpegts demuxer whenever the PMT changes. The second was proposed by XBMC in https://ffmpeg.org/pipermail/ffmpeg-devel/2012-December/135036.html, where they created a new AVMEDIA_TYPE_DATA stream with id=0 and attempted to send packets to it whenever the PMT changed. Signed-off-by: Aman Gupta <[email protected]>
* avfilter/vsrc_testsrc: fix a preprocessor checkJames Almer2018-05-181-1/+1
| | | | Signed-off-by: James Almer <[email protected]>
* avcodec/videotoolbox: fix decoding of some HEVC videosAman Gupta2018-05-181-32/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In a normal hwaccel, the AVHWFramesContext sets AVFrame.hw_frames_ctx when it initializes a new AVFrame in av_hwframe_get_buffer(). But the VT hwaccel doesn't know what hw_frames_ctx to assign when the AVFrame is first created, because it depends on the format of the pixbuf that the decoder eventually decides to return. Thus newly created AVFrames always have a NULL hw_frames_ctx, and the hwaccel would only assign the ctx once a frame was done decoding. This worked fine with the H264 decoder, but with the HEVC decoder the frame's data may be moved to another empty AVFrame. Since the empty AVFrame never had hw_frames_ctx set, a frame with a NULL ctx could be returned to the API user. This patch works around the issue by moving the derived hw_frames_ctx from the AVFrame to a new VTHWFrame which now holds both the CVPixelBufferRef and the AVBuffer. The hw_frames_ctx is only copied to the AVFrame right before it is about to be returned to the user in videotoolbox_postproc_frame() (since in the case of VT, the hw_frames_ctx is only there for the API user anyway). Fixes playback on macOS and iOS of some hevc videos like https://s3.amazonaws.com/tmm1/videotoolbox/germany-hevc-zdf.ts Signed-off-by: Aman Gupta <[email protected]>
* avformat/mpegts: add skip_unknown_pmt optionAman Gupta2018-05-182-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some filtered mpegts streams may erroneously include PMTs for programs that are not advertised in the PAT. This confuses ffmpeg and most players because multiple audio/video streams are created and it is unclear which ones actually contain data. See for example https://tmm1.s3.amazonaws.com/unknown-pmts.ts In this sample, the PAT advertises exactly one program. But the pid it points to for the program's PMT contains PMTs for other programs as well. This is because the broadcaster decided to re-use the same pid for multiple program PMTs. The hardware that filtered the original multi-program stream into a single-program stream did so by rewriting the PAT to contain only the program that was requested. But since it just passed through the PMT pid referenced in the PAT, multiple PMTs are still present for the other programs. Before: Input #0, mpegts, from 'unknown-pmts.ts': Duration: 00:00:10.11, start: 80741.189700, bitrate: 9655 kb/s Program 4 Stream #0:2[0x41]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 11063 kb/s, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc Stream #0:3[0x44](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s Stream #0:4[0x45](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 128 kb/s No Program Stream #0:0[0x31]: Video: mpeg2video ([2][0][0][0] / 0x0002), none(tv), 90k tbr, 90k tbn, 90k tbc Stream #0:1[0x34](eng): Audio: ac3 (AC-3 / 0x332D4341), 0 channels, fltp Stream #0:5[0x51]: Video: mpeg2video ([2][0][0][0] / 0x0002), none, 90k tbr, 90k tbn Stream #0:6[0x54](eng): Audio: ac3 (AC-3 / 0x332D4341), 0 channels With skip_unknown_pmt=1: Input #0, mpegts, from 'unknown-pmts.ts': Duration: 00:00:10.11, start: 80741.189700, bitrate: 9655 kb/s Program 4 Stream #0:0[0x41]: Video: mpeg2video (Main) ([2][0][0][0] / 0x0002), yuv420p(tv, bt709, progressive), 1280x720 [SAR 1:1 DAR 16:9], Closed Captions, 11063 kb/s, 59.94 fps, 59.94 tbr, 90k tbn, 119.88 tbc Stream #0:1[0x44](eng): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, 5.1(side), fltp, 384 kb/s Stream #0:2[0x45](spa): Audio: ac3 (AC-3 / 0x332D4341), 48000 Hz, stereo, fltp, 128 kb/s Signed-off-by: Aman Gupta <[email protected]>
* tests/checkasm/nlmeans: fix invalid read/write on ii bufferClément Bœsch2018-05-181-4/+4
|
* avfilter/vsrc_testsrc: add pal75bars and pal100bars video filter sourcesTobias Rapp2018-05-189-3/+146
| | | | | | | Generates color bar test patterns based on EBU PAL recommendations. Reviewed-by: Paul B Mahol <[email protected]> Signed-off-by: Tobias Rapp <[email protected]>
* avfilter/vf_waveform: add slice threadingPaul B Mahol2018-05-181-244/+549
| | | | Signed-off-by: Paul B Mahol <[email protected]>
* opusenc: use for loops with declarationsRostislav Pehlivanov2018-05-181-54/+44
| | | | Signed-off-by: Rostislav Pehlivanov <[email protected]>
* doc/developer: update style guidelines to include for loops with declarationsRostislav Pehlivanov2018-05-181-0/+3
| | | | Signed-off-by: Rostislav Pehlivanov <[email protected]>
* configure: error out on unsupported MSVC versionsRostislav Pehlivanov2018-05-182-15/+4
| | | | | | | | | | | | | | | | | | | | | | | | | The FATE tests for MSVC versions older than 2013 are untested in FATE and apparently are no longer supported. This commit makes the configure process error out in case an older version is used, and suggests to use a supported version of MSVC to compile. This also changes the documentation to reflect this. As discussed on IRC: 2018-05-12 19:45:16 jamrial then again, most of those were for old msvc, and i think we're not supporting versions older than 2013 (first one c99 compliant) anymore 2018-05-12 19:45:43 +JEEB yea, I think 2013 update 2 is needed 22:53 <@atomnuker> nevcairiel: which commit broke/unsupported support for msvc 2013? 23:23 <@atomnuker> okay, it was JEEB 23:25 <+JEEB> which was for 2012 and older 23:25 <+JEEB> and IIRC we no longer test those in FATE so that was my assumption 23:26 <+JEEB> 2013 is when MS got trolled enough to actually update their C part 23:26 <+JEEB> aand actually advertised FFmpeg support 23:26 <+JEEB> (although it was semi-failing until VS2013 update 1 or 2) Signed-off-by: Rostislav Pehlivanov <[email protected]>
* avformat/mpegts: tag video streams with still imagesAman Gupta2018-05-175-2/+13
| | | | | | | | | | | | Parses the video_stream_descriptor (H.222 2.6.2) to look for the still_picture_flag. This is exposed to the user via a new AV_DISPOSITION_STILL_IMAGE. See for example https://tmm1.s3.amazonaws.com/music-choice.ts, whose video stream only updates every ~6 seconds. Signed-off-by: Aman Gupta <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>
* avformat: add skip_estimate_duration_from_ptsAman Gupta2018-05-173-0/+14
| | | | | | | | | | | | | | | | | | | For seekable mpegts streams, duration is calculated from pts by seeking to the end of the file for a pts and subtracting the initial pts to compute a duration. This can be expensive in terms of added latency during probe, especially when streaming over a network. This new option lets you skip the duration calculation, which is useful when you don't care about the value and want to save some overhead. This patch is particularly useful when dealing with live mpegts streams. Normally such streams are not seekable, so durations are not calculated. However in my case I am dealing with a seekable live mpegts stream (networked access to a .ts file which is still being appended to). Signed-off-by: Aman Gupta <[email protected]>
* lavc/v210dec: Skip Canopus C210 extradata.Carl Eugen Hoyos2018-05-172-1/+7
| | | | | | | | Unbreaks files with unknown extradata, the Canopus decoder accepts both files with and without this extradata (24 byte "INFO", 16 byte "RDRT", rest "FIEL"). Reported-by: Peter Bubestinger Tested-by: Piotr Bandurski
* avcodec/dirac_dwt: Fix integer overflow in COMPOSE_DD97iH0 / COMPOSE_DD137iL0Michael Niedermayer2018-05-171-2/+2
| | | | | | | | Fixes: negation of -2147483648 cannot be represented in type 'int32_t' (aka 'int'); Fixes: 6500/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-4523620274536448 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/fic: Check available input space for cursorMichael Niedermayer2018-05-171-0/+4
| | | | | | | | Fixes: out of array read Fixes: 6546/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FIC_fuzzer-6317064647081984 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/fic: Avoid some magic numbers related to cursorsMichael Niedermayer2018-05-171-1/+2
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/mpeg4video: Detect reference studio streams as studio streamsMichael Niedermayer2018-05-172-9/+25
| | | | Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/mpeg4videodec: Check bps (VOL header) before VOP for studio profileMichael Niedermayer2018-05-171-2/+6
| | | | | | | | | | | Fixes: runtime error: shift exponent -1 is negative Fixes: 7486/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-4977380939530240 Fixes: runtime error: index 36 out of bounds for type 'const uint8_t [32]' Fixes: 7566/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MPEG4_fuzzer-6536620682510336 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
* avcodec/mpeg4videodec: Do not corrupt bits_per_raw_sampleMichael Niedermayer2018-05-171-3/+5
| | | | | Reviewed-by: Kieran Kunhya <[email protected]> Signed-off-by: Michael Niedermayer <[email protected]>