summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* avformat/gifdec: make GIF_APP_EXT_LABEL parsing more robustMichael Niedermayer2013-10-04
| | | | | | Fixes Ticket3021 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mov: force parsing of headers if stts is absentMichael Niedermayer2013-10-04
| | | | | | Fixes Ticket2991 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit 'cd818b3a5709b9b08bd5901cb8863a8b61be265e'Michael Niedermayer2013-10-04
|\ | | | | | | | | | | | | * commit 'cd818b3a5709b9b08bd5901cb8863a8b61be265e': rtmpproto: Validate the embedded flv packet size before copying Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmpproto: Validate the embedded flv packet size before copyingMartin Storsjö2013-10-04
| | | | | | | | | | | | | | | | | | | | This wasn't an issue prior to 58404738, when the whole RTMP packet was copied at once and the length of the individual embedded flv packets only were validated by the flv demuxer. Prior to this patch, this could lead to reads and writes out of bound. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '8921e32f730c191543b84e61338bc9d549aa05a3'Michael Niedermayer2013-10-04
|\| | | | | | | | | | | | | * commit '8921e32f730c191543b84e61338bc9d549aa05a3': rtmpproto: Readjust the end of the flv buffer if handle_metadata exited early Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmpproto: Readjust the end of the flv buffer if handle_metadata exited earlyMartin Storsjö2013-10-04
| | | | | | | | | | | | | | | | If the embedded flv packets were incomplete and we aborted the copying loop early, make sure the flv buffer is trimmed to only contain full packets. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '24fee95321c1463360ba7042d026dae021854360'Michael Niedermayer2013-10-04
|\| | | | | | | | | | | | | * commit '24fee95321c1463360ba7042d026dae021854360': rtmpproto: Move the flv header/trailer addition to append_flv_data Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmpproto: Move the flv header/trailer addition to append_flv_dataMartin Storsjö2013-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | update_offset is also called from handle_metadata, where the packet header sizes is already included in the size. Previously this lead to flv_data/flv_size including 15 uninitialized bytes at the end after each call to handle_metadata, making the flv demuxer lose sync with the stream. Also remove leftover copying in handle_metadata. This is a leftover from the refactoring in 5840473. (Previously this final mempcy was the one that copied all the packets at once, while this is done within the loop right now.) After making sure flv_size is set to the right size, this write was out of bounds. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '72540e514ceaaed8ecb97ed63637b2a2a4447ab8'Michael Niedermayer2013-10-04
|\| | | | | | | | | | | | | * commit '72540e514ceaaed8ecb97ed63637b2a2a4447ab8': rtmpproto: Clear the flv allocation size on reallocp failures Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmpproto: Clear the flv allocation size on reallocp failuresMartin Storsjö2013-10-04
| | | | | | | | | | | | | | This was overlooked in d872fb0f7 since I assumed all the realloc issues in the rtmp code was fixed already. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '4d6d70292e91a7ef027824d731b6b6570ceabf2f'Michael Niedermayer2013-10-04
|\| | | | | | | | | | | | | * commit '4d6d70292e91a7ef027824d731b6b6570ceabf2f': rtmpproto: Pass the 'live' parameter in the right unit Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmpproto: Pass the 'live' parameter in the right unitMartin Storsjö2013-10-04
| | | | | | | | | | | | | | | | | | | | | | The current magic numbers passed are values in seconds, while the parameter itself should be passed over the wire in milliseconds. This makes (some/all?) live streams from Red5 work correctly, that previously returned StreamNotFound even with "-rtmp_live live". After this commit, the default 'any' also works on these streams. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'a6b361325f2bfc8d9d4e5f761d6c1a07b209c4fb'Michael Niedermayer2013-10-04
|\| | | | | | | | | | | | | * commit 'a6b361325f2bfc8d9d4e5f761d6c1a07b209c4fb': rtmpproto: Print the error code string if there's no description Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmpproto: Print the error code string if there's no descriptionMartin Storsjö2013-10-04
| | | | | | | | | | | | | | | | | | | | On (certain streams/setups at least on) Red5, the description string actually is present, but empty. Therefore, first try loading the description, but if not found or empty, load the code string instead. The code string is quite understandable in most cases anyway (like "NetStream.Play.StreamNotFound"). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '49fe9c05f97bc2cfafd8fdcfea2f313d7c8e2c48'Michael Niedermayer2013-10-04
|\| | | | | | | | | | | | | | | | | | | * commit '49fe9c05f97bc2cfafd8fdcfea2f313d7c8e2c48': oggparsevorbis: K&R formatting cosmetics Conflicts: libavformat/oggparsevorbis.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * oggparsevorbis: K&R formatting cosmeticsVittorio Giovara2013-10-03
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
| * avformat/output-example: Declare link dependency on libswscale in the MakefileDiego Biurrun2013-10-03
| |
* | avformat/vobsub: raise packet even if apparently incomplete.Clément Bœsch2013-10-04
| | | | | | | | | | This restore the latest packet which was dropped from the FATE test in dbfe61100.
* | avformat/vobsub: fix several issues.Clément Bœsch2013-10-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here is an extract of fate-samples/sub/vobsub.idx, with an additional text at the end of each line to better identify each bitmap: timestamp: 00:04:55:445, filepos: 00001b000 Ace! timestamp: 00:05:00:049, filepos: 00001b800 Wake up, honey! timestamp: 00:05:02:018, filepos: 00001c800 I gotta go to work. timestamp: 00:05:02:035, filepos: 00001d000 <???> timestamp: 00:05:04:203, filepos: 00001d800 Look after Clayton, okay? timestamp: 00:05:05:947, filepos: 00001e800 I'll be back tonight. timestamp: 00:05:07:957, filepos: 00001f800 Bye! Love you. timestamp: 00:05:21:295, filepos: 000020800 Hey, Ace! What's up? timestamp: 00:05:23:356, filepos: 000021800 Hey, how's it going? timestamp: 00:05:24:640, filepos: 000022800 Remember what today is? The 3rd! timestamp: 00:05:27:193, filepos: 000023800 Look over there! timestamp: 00:05:28:369, filepos: 000024800 Where are they going? timestamp: 00:05:28:361, filepos: 000025000 <???> timestamp: 00:05:29:946, filepos: 000025800 Let's go see. timestamp: 00:05:31:230, filepos: 000026000 I can't, man. I got Clayton. Note the two "<???>": they are basically split subtitles (with the previous one), which the dvdsub decoder is now supposed to reconstruct with a previous commit. But also note that while the first chunk has increasing timestamps, timestamp: 00:05:02:018, filepos: 00001c800 timestamp: 00:05:02:035, filepos: 00001d000 ...it's not the case of the second one (and this is not an exception in the original file): timestamp: 00:05:28:369, filepos: 000024800 timestamp: 00:05:28:361, filepos: 000025000 For the dvdsub decoder, they need to be "filepos'ed" ordered, but the FFDemuxSubtitlesQueue is timestamps ordered, which is the reason of the introduction of a sub sort method in the context, to allow giving priority to the position, and then the timestamps. With that change, the dvdsub decoder get fed with ordered packets. Now the packet size estimation was also broken: the filepos differences in the vobsub index defines the full data read between two subtitles chunks, and it is necessary to take into account what is read by the mpegps_read_pes_header() function since the length returned by that function doesn't count the size of the data it reads. This is fixed with the introduction of total_read, and {old,new}_pos. By doing this change, we can drop the unreliable len16 heuristic and simplify the whole loop. Note that mpegps_read_pes_header() often read more than one PES packet (typically in one call it can read 0x1ba and 0x1be chunk along with the relevant 0x1bd packet), which triggers the "total_read + pkt_size > psize" check. This is an expected behaviour, which could be avoided by having a more chunked version of mpegps_read_pes_header(). The latest change is the extraction of each stream into its own subtitles queue. If we don't do this, the maximum size for a subtitle chunk is broken, and the previous changes can not work. Having each stream in a different queue requires some little adjustments in the seek code of the demuxer. This commit is only meaningful as a whole change and can not be easily split. The FATE test changes because it uses the vobsub demuxer.
* | avformat: add support to force specific AVCodecsMichael Niedermayer2013-10-02
| | | | | | | | | | | | | | | | previously only codec_ids could be forced, which did not allow forcing a specific implementation like libopenjpeg vs jpeg2000. Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/utils: pass AVFormatContext to find_decoder()Michael Niedermayer2013-10-02
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mov: fix trun / pseudo_stream_id handlingMichael Niedermayer2013-10-02
| | | | | | | | | | | | This fixes simple concatenated h264 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-10-02
|\| | | | | | | | | | | | | * qatar/master: rtmp: alias rtmp_listen to listen Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtmp: alias rtmp_listen to listenLuca Barbato2013-10-01
| | | | | | | | Make it uniform with the other protocols.
* | Merge commit 'ad0560fe7491a85c3e71d5a3d6a0443f10b33ab1'Michael Niedermayer2013-10-02
|\| | | | | | | | | | | | | | | | | | | * commit 'ad0560fe7491a85c3e71d5a3d6a0443f10b33ab1': mxf: Remove a typo Conflicts: libavformat/mxfdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mxf: Remove a typoLuca Barbato2013-10-01
| | | | | | | | Introduced in 93370d1216
* | Merge commit 'cc41167aede4c101ad17eeffa8f39bb6c23d3dad'Michael Niedermayer2013-10-02
|\| | | | | | | | | | | | | * commit 'cc41167aede4c101ad17eeffa8f39bb6c23d3dad': asfdec: Check the return value of asf_read_stream_properties Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * asfdec: Check the return value of asf_read_stream_propertiesMartin Storsjö2013-09-30
| | | | | | | | | | | | | | | | | | | | This makes sure errors in setting stream parameters are passed on to the caller. This avoids successfully opening files while some parameters aren't filled in properly. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | Avoid img_segment_size == 0 in mtv demuxer.Carl Eugen Hoyos2013-09-30
| | | | | | | | Fixes ticket #3011.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-09-30
|\| | | | | | | | | | | | | * qatar/master: omadec: fix bitrate for ATRAC3+ streams Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * omadec: fix bitrate for ATRAC3+ streamsMaxim Poliakovski2013-09-29
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '23d0fdcf6f30843fc3f14084d80581f1ca10f1f3'Michael Niedermayer2013-09-30
|\| | | | | | | | | | | | | | | | | | | * commit '23d0fdcf6f30843fc3f14084d80581f1ca10f1f3': Add support for multichannel ATRAC3+ streams. Conflicts: libavformat/oma.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Add support for multichannel ATRAC3+ streams.Maxim Poliakovski2013-09-29
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '93370d12164236d59645314871a1d6808b2a8ddb'Michael Niedermayer2013-09-30
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '93370d12164236d59645314871a1d6808b2a8ddb': mxfdec: set audio timebase to 1/samplerate Conflicts: libavformat/mxfdec.c tests/ref/fate/mxf-demux tests/ref/seek/lavf-mxf tests/ref/seek/lavf-mxf_d10 See: 83cab07a4c7f8ee1521c49e387b7d86de78d1955 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mxfdec: set audio timebase to 1/samplerateAnton Khirnov2013-09-29
| | | | | | | | | | | | | | | | Fixes sync in some samples (e.g. bugs 7581 and 8374 in VLC). Based on a commit by Matthieu Bouron <matthieu.bouron@gmail.com> Reported-by: Jean-Baptiste Kempf <jb@videolan.org> CC: libav-stable@libav.org
* | Merge commit 'c231987662194d009dd91bfc57c678e0e70ca161'Michael Niedermayer2013-09-30
|\| | | | | | | | | | | | | | | | | | | * commit 'c231987662194d009dd91bfc57c678e0e70ca161': mov: Make sure the read sample count is nonnegative Conflicts: libavformat/mov.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mov: Make sure the read sample count is nonnegativeMartin Storsjö2013-09-29
| | | | | | | | | | | | | | | | | | This avoids setting a negative number of frames, ending up with a negative average frame rate. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '640a2427aafa774b83316b7a8c5c2bdc28bfd269'Michael Niedermayer2013-09-30
|\| | | | | | | | | | | | | * commit '640a2427aafa774b83316b7a8c5c2bdc28bfd269': bfi: Add some very basic sanity checks for input packet sizes Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * bfi: Add some very basic sanity checks for input packet sizesMartin Storsjö2013-09-29
| | | | | | | | | | CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '9fc7184d1a9af8d97b3fc5c2ef9d0a647d6617ea'Michael Niedermayer2013-09-30
|\| | | | | | | | | | | | | | | * commit '9fc7184d1a9af8d97b3fc5c2ef9d0a647d6617ea': bfi: Avoid divisions by zero See: 99a8552dae54fd464f19a00d9e5b92596c5c058a Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * bfi: Avoid divisions by zeroMartin Storsjö2013-09-29
| | | | | | | | | | | | | | | | | | If a zero-length video packet is to be returned, just return AVERROR(EAGAIN) and switch back to the audio stream. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'a9221e39600a31ee13e736e9e47743cde23f0280'Michael Niedermayer2013-09-29
|\| | | | | | | | | | | | | | | * commit 'a9221e39600a31ee13e736e9e47743cde23f0280': electronicarts: Add more sanity checking for the number of channels Note: This check is probably unnecessary Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * electronicarts: Add more sanity checking for the number of channelsMartin Storsjö2013-09-29
| | | | | | | | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'd07aa3f02b73ab1371c13ac7898338380ca0932b'Michael Niedermayer2013-09-29
|\| | | | | | | | | | | | | * commit 'd07aa3f02b73ab1371c13ac7898338380ca0932b': riffdec: Add sanity checks for the sample rate Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * riffdec: Add sanity checks for the sample rateMartin Storsjö2013-09-29
| | | | | | | | | | | | | | | | This avoids a division by zero for G726. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '28ff439efd2362fb21e1a78610737f2e26a72d8f'Michael Niedermayer2013-09-29
|\| | | | | | | | | | | | | | | | | | | | | * commit '28ff439efd2362fb21e1a78610737f2e26a72d8f': mvi: Add sanity checking for the audio frame size Conflicts: libavformat/mvi.c See: ea1d8465e6eca582c09e2526f677033b62576fda Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mvi: Add sanity checking for the audio frame sizeMartin Storsjö2013-09-29
| | | | | | | | | | | | | | | | This avoids a division by zero. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'adc09136a4a63b152630abeacb22c56541eacf60'Michael Niedermayer2013-09-29
|\| | | | | | | | | | | | | | | | | | | | | * commit 'adc09136a4a63b152630abeacb22c56541eacf60': xwma: Avoid division by zero Conflicts: libavformat/xwma.c See: a3cb7f992f88fcfa524bd9cd08b28e09d6718f75 Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * xwma: Avoid division by zeroMartin Storsjö2013-09-29
| | | | | | | | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '8d07258bb6063d0780ce2d39443d6dc6d8eedc5a'Michael Niedermayer2013-09-29
|\| | | | | | | | | | | | | | | | | | | | | | | * commit '8d07258bb6063d0780ce2d39443d6dc6d8eedc5a': avidec: Make sure a packet is large enough before reading its data Conflicts: libavformat/avidec.c See: 028cc42a1638e6f93a857f11c2568d1c3a51e612 Note: data!=NULL implies that the allocated array is at least FF_INPUT_BUFFER_PADDING_SIZE large Merged-by: Michael Niedermayer <michaelni@gmx.at>