aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
Commit message (Collapse)AuthorAgeFilesLines
...
* | avidec: check for valid bit_rate rangeAndreas Cadhalpun2015-05-041-1/+5
| | | | | | | | | | | | | | | | | | | | If bit_rate is negative, it can trigger an av_assert2 in av_rescale_rnd. Since av_rescale returns int64_t, but st->codec_bit_rate is int, it can also overflow into a negative value. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/apngenc: Fix png remuxing by using default extension apng.Carl Eugen Hoyos2015-05-042-2/+2
| |
* | lavf/mxfenc: Write correct interlaced flag when muxing dnxhd.Carl Eugen Hoyos2015-05-042-1/+3
| | | | | | | | | | Reported and early patch version tested by forum user gridtank. Reviewed-by: Tomas Härdin
* | avformat/matroskadec: Use tracks[k]->stream instead of s->streams[k]Michael Niedermayer2015-05-041-2/+2
| | | | | | | | | | | | The later is not correct Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | matroskadec: check s->streams[k] before using itAndreas Cadhalpun2015-05-041-1/+1
| | | | | | | | | | | | | | This fixes a segmentation fault. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | matroskadec: use uint64_t instead of int for index_scaleAndreas Cadhalpun2015-05-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | index_scale is set to matroska->time_scale of type uint64_t. When index_scale is int, the assignment can overflow and e.g. result in index_scale = 0. This causes a floating point exception due to the division by index_scale. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/matroskadec: Mark static tables as constMichael Niedermayer2015-05-021-39/+39
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/http: support HTTPS when listeningRodger Combs2015-05-021-3/+6
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpegts: Detect changes in packet through CRC instead of just the ↵Michael Niedermayer2015-05-011-1/+7
| | | | | | | | | | | | 5bit version Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpegts: reset last_ver on corrupted packetsMichael Niedermayer2015-05-011-1/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpegts: Factorize version checking code outMichael Niedermayer2015-05-011-8/+14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/webm_chunk: Fix a memory leak.Vignesh Venkatasubramanian2015-04-301-5/+0
| | | | | | | | | | | | | | | | | | Fix a duplicate memory allocation. priv_data should be allocated in line 64 call to avformat_alloc_output_context2 since we pass the correct AVFormat to it. This removes the duplicate allocation. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/webm_chunk: Use dyn_buf to write chunksVignesh Venkatasubramanian2015-04-301-18/+30
| | | | | | | | | | | | | | | | | | | | | | Use dyn_duf to write chunks so that we create the actual chunk file only after the entire chunk data is available. This will help not confuse other software looking at the chunk file (e.g. a web server) by seeing a zero length file when ffmpeg is writing into it. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov: Do not read ACLR into extradata for H.264Michael Niedermayer2015-04-301-0/+2
| | | | | | | | | | | | | | Fixes regression decoding AVCI Fixes Ticket4493 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpegts: Also parse the FMC descriptor if the codec has not been ↵Michael Niedermayer2015-04-291-1/+3
| | | | | | | | | | | | | | | | | | identified yet Fixes Detecting AAC with such descriptor if the parts needed for detection are later in the stream Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mpegts: reset last_version on seekingMichael Niedermayer2015-04-291-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit '82de8d71118f4eafd6a43e9ea9169bd411793798'Michael Niedermayer2015-04-291-0/+20
|\| | | | | | | | | | | | | | | | | | | * commit '82de8d71118f4eafd6a43e9ea9169bd411793798': mpegts: Update the PSI/SI table only if the version change Conflicts: libavformat/mpegts.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mpegts: Update the PSI/SI table only if the version changeJohn Högberg2015-04-281-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a PAT is finished while a PMT section filter is opened but not yet finished, the PMT section filter is closed and all the received data is discarded. This is usually not an issue but some multiplexers (With very quick PAT/PMT repetition settings) consistently emit a PMT section start, then a PAT, and then the rest of the PMT, causing the aforementioned behavior to result in no PMT being finished. In the most pathologic situation the stream information are lost and the probe fallback miscategorizes subtitles as mp3 audio. Avoid the issue through eliminating redundant PSI/SI table updates by checking their version field, which is required by the standard to be incremented on every change no matter how minor. CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | nutdec: fix illegal count check in decode_main_headerAndreas Cadhalpun2015-04-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The existing check has two problems: 1) i + count can overflow, so that the check '< 256' returns true. 2) In the (i == 'N') case occurs a j-- so that the loop runs once more. This can trigger the assertion 'nut->header_len[0] == 0' or cause segmentation faults or infinite hangs. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | nutdec: fix memleaks on error in nut_read_headerAndreas Cadhalpun2015-04-281-5/+13
| | | | | | | | | | Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | nutdec: check chapter creation in decode_info_headerAndreas Cadhalpun2015-04-281-0/+4
| | | | | | | | | | | | This fixes a segmentation fault when accessing the metadata. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | nutdec: check for negative frame rate in decode_info_headerAndreas Cadhalpun2015-04-281-1/+2
| | | | | | | | | | | | | | A negative frame rate triggers an av_assert2 in av_rescale_rnd. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/dtsdec: Extend DTS core sync wordfoo862015-04-281-2/+4
| | | | | | | | | | | | | | | | | | | | Check extended sync word for 16-bit LE and BE core streams to reduce probability of alias sync detection. Previously sync word extension was checked only for 14-bit streams. This follows up the similar change in avcodec/dca_parser. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | webmdashenc: Fix UTCTiming ElementVignesh Venkatasubramanian2015-04-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove the direct profile from UTCTiming element. Per DASH spec, direct profile value should be the time at which the request was made to the server and not the time at which the manifest was written. So ffmpeg cannot write this value. This patch removes the direct profile and write the UTCTiming element with the http profile only if a URL is passed as a parameter. Update the fate test to reflect this change. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | libavformat/webm_chunk: Write first audio packet.Vignesh Venkatasubramanian2015-04-281-3/+0
| | | | | | | | | | | | | | | | Fix a bug where the chunk muxer doesn't write the very first audio packet (with pts == 0). Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/aviobuf: Do not resize the buffer in ffio_ensure_seekback() if ↵Michael Niedermayer2015-04-271-1/+1
| | | | | | | | | | | | | | | | | | there is no read function Without a read function there can never be more data read than the buffer could hold Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/format: Add generic trace av_log in av_probe_input_format3()Michael Niedermayer2015-04-251-0/+2
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'b17cbb0b1c4fdf8324eff24d40a02201bfaebfd3'Michael Niedermayer2015-04-241-0/+1
|\| | | | | | | | | | | | | * commit 'b17cbb0b1c4fdf8324eff24d40a02201bfaebfd3': riff: Add GMP4 fourcc for mpeg4 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * riff: Add GMP4 fourcc for mpeg4Vittorio Giovara2015-04-241-0/+1
| |
* | Merge commit '3c04ec04df8cba12f3a7408709ff5c1fddfe8d82'Michael Niedermayer2015-04-241-0/+1
|\| | | | | | | | | | | | | * commit '3c04ec04df8cba12f3a7408709ff5c1fddfe8d82': riff: Add GLV4 fourcc for mpeg4 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * riff: Add GLV4 fourcc for mpeg4Vittorio Giovara2015-04-241-0/+1
| |
* | Merge commit 'b90adb0aba073f9c1b4abca852119947393ced4c'Michael Niedermayer2015-04-241-0/+2
|\| | | | | | | | | | | | | * commit 'b90adb0aba073f9c1b4abca852119947393ced4c': rtsp: Make sure we don't write too many transport entries into a fixed-size array Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtsp: Make sure we don't write too many transport entries into a fixed-size ↵Martin Storsjö2015-04-241-0/+2
| | | | | | | | | | | | | | array CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
| * rtpenc_jpeg: Handle case of picture dimensions not dividing by 8Andrey Utkin2015-04-231-2/+2
| | | | | | | | | | | | | | This fixes the calculation of the number of needed blocks to make sure that ALL pixels are represented by the result. Signed-off-by: Martin Storsjö <martin@martin.st>
* | avformat/mp3: large id3 tags break concatenated file detectionwm42015-04-241-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the file size is much larger than what is indicated in the XING header, the demuxer assumes it's a concatenated file, and throws away the (presumably) incorrect duration information. Unfortunately, this also triggers if the id3 tags are very large (embedded pictures and such). Then the half-baked heuristic not only breaks the duration display, but also gapless audio. Fix it by subtracting the size of the headers (the check is off by some bytes, but that doesn't matter at all). Note that there could be an arbitrary amount of tags _after_ the mp3 data, but hopefully these are not too large to trigger the heuristic in practice. Also add a warning when this happens. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/wvdec: fix seekingwm42015-04-241-36/+2
| | | | | | | | | | | | | | | | While I'm not sure why exactly sure why the old code could end up in the wrong position, using the generic index code is much simpler and is known to work correctly. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'eb7ddb5066843ab16caf33b05eafb2576648b797'Michael Niedermayer2015-04-241-5/+2
|\| | | | | | | | | | | | | * commit 'eb7ddb5066843ab16caf33b05eafb2576648b797': rtsp: Don't warn about unparsed time ranges Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtsp: Don't warn about unparsed time rangesMartin Storsjö2015-04-231-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the error logging added in 4e54432164. This avoids warnings about "Invalid interval start specification 'now'" for live rtsp streams. We only try to parse some of the many valid values for time ranges in RTSP - the other ones are fully valid but not interesting for the use case in rtsp.c, so we shouldn't warn about them. (Parsing the time ranges is needed to allow seeking, but e.g. setting the current realtime clock for the start time doesn't make sense. av_parse_time has got a different mode for parsing absolute times as well, which can handle the special case "now", but that doesn't make much sense for this particular use in rtsp.c.) Signed-off-by: Martin Storsjö <martin@martin.st>
* | lavf: Reset global flag on deinitVittorio Giovara2015-04-231-0/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | network: Do not leave context locked on errorVittorio Giovara2015-04-231-1/+3
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | fate: add mp3 CBR seek testwm42015-04-231-0/+2
| | | | | | | | | | | | | | This tests the "old", now non-default seek mode, and this requires a special extra argument. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: add AVFMT_FLAG_FASTSEEK, use it for mp3wm42015-04-224-2/+4
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | bink: check vst->index_entries before using itAndreas Cadhalpun2015-04-221-1/+4
| | | | | | | | | | | | | | | | | | This fixes a NULL pointer dereference if vst->duration is 0. The problem was introduced in commit 0588acaf. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mp3dec: make generic index mode the defaultwm42015-04-221-1/+1
| | | | | | | | | | | | | | It's the most useful mode, because it seeks accurately, and does not break features like gapless audio. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mp3dec: allow enabling generic seek modewm42015-04-221-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | "-usetoc 2" now invokes the generic seek and indexing mode. This mode skips data until the seek target is reached, and this is exact. It also makes gapless audio actually work if a seek past the start of the file is involved. Change the fate-gapless-mp3 test to use the new mode, and move the old one to fate-gapless-mp3-toc (since the test forces use of the Xing TOC). The new mode has a different result for the seek - this result is actually correct. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mp3dec: use the common mechanism for skipping sampleswm42015-04-221-5/+2
| | | | | | | | | | | | | | | | | | | | The mp2 seek test results change. Whether to skip samples if the file had no LAME gapless tags was inconsistent. When seeking to the start of the file, 529 samples were skipped, but when playing from start, nothing was skipped. This commit changes the behavior on seek to skip nothing. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: add common mechanism for skipping samples at the start of filewm42015-04-222-0/+13
| | | | | | | | | | | | | | This makes using the generic indexing code with mp3 easier at a later point. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | webmdashenc: parameter'ize minimumUpdatePeriodVignesh Venkatasubramanian2015-04-221-1/+3
| | | | | | | | | | | | | | | | | | Some players do not support setting minimumUpdatePeriod to zero. This patch adds a new parameter that will let the users set any value to this field. Also updates the test and the documentation. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | webmdashenc: Add minimumUpdatePeriodVignesh Venkatasubramanian2015-04-221-1/+2
| | | | | | | | | | | | | | | | | | | | | | DASH spec requires the presence of either duration of the period or the minimumUpdatePeriod element. This patch adds the minimumUpdatePeriod element hardcoded with the value 0 as the manifest will never be updated for WebM DASH Live streams. Also updating the fate test reference file. Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mov.c: Use %d to print an enum, not PRIu8Chris Watkins2015-04-211-1/+1
| | | | | | | | | | | | | | | | | | | | Using the PRIu8 format specifier to print an enum value causes a compiler warning, so use %d instead. Fixes ticket #4467. Signed-off-by: Chris Watkins <watk@chromium.org> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>