summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAge
...
* avformat/matroskaenc: Forward errors from avpriv_split_xiph_headers()Andreas Rheinhardt2020-05-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskadec: Use proper context for loggingAndreas Rheinhardt2020-05-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avcodec/xiph: Return better error codesAndreas Rheinhardt2020-05-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/segment: Propagate dispositionAndreas Rheinhardt2020-05-23
| | | | Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/segment: Access AVStream more directlyAndreas Rheinhardt2020-05-23
| | | | | | | by storing s->streams[i] in a pointer instead of constantly using s->streams[i]->... Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webmdashenc: Simplify parsing stringsAndreas Rheinhardt2020-05-23
| | | | | | | | | Don't use the functions for searching substrings when all one is looking for is a char anyway. Given that there is already a standard library function for "find last occurence of a char in a string" also allows one to remove a custom loop. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webmdashenc: Don't segfault on invalid argumentsAndreas Rheinhardt2020-05-23
| | | | | | | | | | | | | The current parsing process for adaptation_sets does not guarantee every adaptation set to contain at least one stream, because the loop exits immediately as soon as the end of the string has been reached, without checking whether the currently active adaptation set group is lacking a stream. This would lead to segfaults lateron as the rest of the code presumed that every adaptation set contains a stream. This commit fixes this by erroring out when the last adaptation set group is incomplete. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webmdashenc: Remove possibility of infinite loopAndreas Rheinhardt2020-05-23
| | | | | | | | | | | | | | | | The WebM DASH manifest muxer uses a loop to parse the adaptation_sets string (which is given by the user and governs which AVStreams are mapped to what adaptation set) and the very beginning of this loop is "if (*p == ' ') continue;". This of course leads to an infinite loop if the condition is true. It is true if e.g. the string begins with ' ' or if there are more than one ' ' between different adaptation set groups. To fix this, the parsing process has been modified to consume the space if it is at a place where it can legitimately occur, i.e. when a new adaptation set group is expected. The latter restriction implies that an error is returned if a space exists where none is allowed to exist. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webmdashenc: Be more strict when parsing stream indicesAndreas Rheinhardt2020-05-23
| | | | | | | | | | | | The syntax of the adaptation_sets string by which the user determines the mapping of AVStreams to adaptation sets is "id=x,streams=a,b,c id=y,streams=d,e" (means: the streams with the indices a, b and c belong to the adaptation set with id x). Yet there was no check for whether these indices were actual numbers and if there is a number whether it really extends to the next ',', ' ' or to the end of the string or not. This commit adds a check for this. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/webmdashenc: Avoid allocation for parsing a numberAndreas Rheinhardt2020-05-23
| | | | | | | | | | | In order to parse a number from a string, the WebM DASH manifest muxer would duplicate (via heap-allocation) the part of the string that contains the number, then read the number via atoi() and then free the duplicate again. This has been replaced by simply using strtoll() (which in contrast to atoi() has defined behaviour when the number is not representable). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/mux: Remove unnecessary unreferencing of AVPacketAndreas Rheinhardt2020-05-23
| | | | | | | | Since commit c5324d92c5f206dcdc2cf93ae237eaa7c1ad0a40 all custom interleave_packet() functions always return clean packets (even on error), so that unreferencing manually can be removed. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/avformat: Remove redundant "NOT PART OF PUBLIC API"Andreas Rheinhardt2020-05-23
| | | | | | | | AVStream.request_probe as well as AVStream.mux_ts_offset are below the separator of public and private fields, so that a further "NOT PART OF PUBLIC API" is redundant. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avfilter/vf_lut3d: initial float pixel format supportMark Reid2020-05-23
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ass: explicitly set ScaledBorderAndShadowOneric2020-05-23
| | | | | Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec: move mpeg4 profiles to profiles.hMarton Balint2020-05-22
| | | | | | Also bump micro version after the recent option changes. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec: move msbc profile to encoderMarton Balint2020-05-22
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/options_table: remove dts profilesMarton Balint2020-05-22
| | | | | | Our encoder (dcaenc) does not use any of these. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec: move aacenc profiles to profiles.hMarton Balint2020-05-22
| | | | Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec/options_table: make AVCodecContext->profile search for child constantsMarton Balint2020-05-22
| | | | | | | | | This change makes it possible for child encoders to define custom profile option names which can be used for setting the AVCodecContext->profile. Also rename unit name to something rather unique, so it won't be used elsewhere. Signed-off-by: Marton Balint <cus@passwd.hu>
* avutil/opt: add AV_OPT_FLAG_CHILD_CONSTSMarton Balint2020-05-22
| | | | | | | | This will be used for AVCodecContext->profile. By specifying constants in the encoders we won't have to use the common AVCodecContext options table and different encoders can use the same profile name even with different values. Signed-off-by: Marton Balint <cus@passwd.hu>
* movenc: Fix accidental leftover duplication from 1aec1fbcc595Martin Storsjö2020-05-22
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mfenc: Fall back to avctx->time_base if avctx->framerate isn't setMartin Storsjö2020-05-22
| | | | | | | | The framerate field is the one users are supposed to set, but not all users might be setting it, so it might be good to fall back time_base in that case. Signed-off-by: Martin Storsjö <martin@martin.st>
* mfenc: Fix setting has_b_frames for max_b_frames == 1Martin Storsjö2020-05-22
| | | | | | | This was a mistake in my own additions in 050b72ab5ef318605b305aa6cb920e8b52f1002e. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Fix conversion of the first frame for extradata-less H264/HEVCMartin Storsjö2020-05-22
| | | | | | | | | | | | | | | | | | | Move the copying of the frame to vos_data further up in the function, so that when writing the actual frame data for the first frame, it's clear that the stream really is in annex b format, for the cases where we create extradata from the first frame. Alternatively - we could invert the checks for bitstream format. If extradata is missing, we can't pretend that the bitstream is in mp4 form, because we can't even know the NAL unit length prefix size in that case. Also avoid creating extradata for AVC intra. If the track tag is an AVC intra tag, don't copy the frame into vos_data - this matches other existing cases of how vos_data and TAG_IS_AVCI interact in other places. Signed-off-by: Martin Storsjö <martin@martin.st>
* cbs_h265: Fix use of an uninitialized variableMartin Storsjö2020-05-22
| | | | | | | This fixes test failures in fate-cbs-hevc-* in certain configurations since c53f9f436440be4e18. Signed-off-by: Martin Storsjö <martin@martin.st>
* avcodec/bsf: mention that av_bsf_send_packet() returning EAGAIN is not an errorJames Almer2020-05-22
| | | | | | | | | | | | | | | EAGAIN is returned when input is provided but can't be consumed. The filtering process is unaffected in this case, and the function will be able to consume new input after retrieving filtered packets with av_bsf_receive_packet(). Remove the line about empty packets never failing added in 41b05b849f215b03eeb9e3608571ba47de64182a while at it. Even if it's currently the case, it unnecessarily constrains the API and could be changed in the future in case it needs to be extended. The user should always check for errors and never expect a call to never fail. Reviewed-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec.h: split bitstream filters API into its own headerAnton Khirnov2020-05-22
|
* lavc: rename bsf.h to bsf_internal.hAnton Khirnov2020-05-22
| | | | This will allow adding a public header named bsf.h
* avcodec.h: split AVCodecParameters API into its own headerAnton Khirnov2020-05-22
|
* Stop hardcoding align=32 in av_frame_get_buffer() calls.Anton Khirnov2020-05-22
| | | | Use 0, which selects the alignment automatically.
* cmdutils: drop libavformat/network.h includeAnton Khirnov2020-05-22
| | | | | It is not a public header and has not been used since 10173c0e58e557582dbd659f42c6aa164a8682db
* avfilter/af_aiir: move response drawing as last stepPaul B Mahol2020-05-22
|
* avfilter/af_aiir: fix first denominator calculationPaul B Mahol2020-05-22
|
* avfilter/af_aiir: add more descriptive options aliasesPaul B Mahol2020-05-22
|
* avfilter/af_aiir: export normalize optionPaul B Mahol2020-05-22
| | | | And enable it in all modes by default.
* avfilter/af_aiir: fix first delay valuePaul B Mahol2020-05-22
|
* avformat/utils: Set stream side-data size even without side-dataAndreas Rheinhardt2020-05-22
| | | | | Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskaenc: Remove pointless castsAndreas Rheinhardt2020-05-22
| | | | | | by using a const void * pointer as an intermediate. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/matroskaenc: Don't use stream side-data sizeAndreas Rheinhardt2020-05-22
| | | | | | | | | | | | | | | | | | | | | | av_stream_get_side_data() tells the caller whether a stream has side data of a specific type; if present it can also tell the caller the size of the side data via an optional argument. The Matroska muxer always used this optional argument, although it doesn't really need the size, as the relevant side-data are not buffers, but structures. So change this. Furthermore, relying on the size also made the code susceptible to a quirk of av_stream_get_side_data(): It only sets the size argument if it found side data of the desired type. mkv_write_video_color() checks for side-data twice with the same variable for the size without resetting the size in between; if the second type of side-data isn't present, the size will still be what it was after the first call. This was not dangerous in practice, as the check for the existence of the second side-data compared the size with the expected size, so it would only be problematic if lots of elements were to be added to AVContentLightMetadata. Reviewed-by: James Almer <jamrial@gmail.com> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
* avformat/http: increase BUFFER_SIZE to MAX_URL_SIZE + HTTP_HEADERS_SIZEJoey Smith2020-05-21
| | | | | | | | | | | | | Some real-world sites use an authorization header with a bearer token; when combined with lengthy request parameters to identify the video segment, it's rather trivial these days to have a request body of more than 4k bytes. MAX_URL_SIZE is hard-coded to 4k bytes in libavformat/internal.h, and HTTP_HEADERS_SIZE is 4k as well in libavformat/http.h, so this patch increases the buffer size to 8k, as that is the default request body limit in Apache, and most other httpds seem to support at least as much, if not more. Signed-off-by: Marton Balint <cus@passwd.hu>
* avcodec: deprecate Lossless and Intra Only encoder capabilitesJames Almer2020-05-21
| | | | | | | Both are codec properties and not encoder capabilities. The relevant AVCodecDescriptor.props flags exist for this purpose. Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/cmdutils: remove lossless and intra only capability entries from ↵James Almer2020-05-21
| | | | | | | | print_codec() They are codec properties, not encoder capabilities. Signed-off-by: James Almer <jamrial@gmail.com>
* fftools/ffmpeg_filter: check the codec's descriptor to see if it's losslessJames Almer2020-05-21
| | | | Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/decode: remove ff_decode_bsfs_uninit()James Almer2020-05-21
| | | | | | It's been a wrapper for a simple av_bsf_free() call since c96904f525. Signed-off-by: James Almer <jamrial@gmail.com>
* avcodec/tiff: Check for Tiled and Stripped TIFFsMichael Niedermayer2020-05-21
| | | | | | | | | | TIFF 6 spec: "Do not use both strip-oriented and tile-oriented fields in the same TIFF file." Fixes: null pointer use, crash Fixes: crash-762680f9d1b27f9b9085e12887ad44893fb2b020 Found-by: Shiziru <lunasl@protonmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/pnmdec: Use unsigned for maxval rescalingMichael Niedermayer2020-05-21
| | | | | | | | Fixes: signed integer overflow: 65535 * 55335 cannot be represented in type 'int' Fixes: 21955/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5669206981083136 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/ivi: Clear got_p_frame before decoding a new frame using itMichael Niedermayer2020-05-21
| | | | | | | | Fixes: assertion failure Fixes: 21666/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_INDEO4_fuzzer-5706468994318336 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/dsddec: Check channelsMichael Niedermayer2020-05-21
| | | | | | | | | Fixes: division by zero Fixes: 21677/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DSD_MSBF_fuzzer-5712547983654912 Fixes: 21751/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DSD_LSBF_fuzzer-5197097180856320 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/xvididct: Fix integer overflow in idct_row()Michael Niedermayer2020-05-21
| | | | | | | | Fixes: signed integer overflow: -1238335488 + -1003634688 cannot be represented in type 'int' Fixes: 21649/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MJPEG_fuzzer-5112005765890048 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* avcodec/wmalosslessdec: Fix integer overflows in revert_inter_ch_decorr()Michael Niedermayer2020-05-21
| | | | | | | | Fixes: signed integer overflow: -717241856 + -1434459904 cannot be represented in type 'int' Fixes: 21405/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5677143666458624 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>