summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* movenchint: Clear size and len if the realloc failedMartin Storsjö2013-09-22
| | | | | | | | Previously these were left in an inconsistent state. Pointed out by Michael Niedermayer. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Return a proper error code for invalid combinationsMartin Storsjö2013-09-22
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* electronicarts: Check packet sizes before readingMartin Storsjö2013-09-22
| | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Avoid setting avg_frame_rate if delta_dts is negativeMartin Storsjö2013-09-22
| | | | | | | | | This avoids setting avg_frame_rate to invalid (negative) values. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Use keyframes as default fragmentation point in ismvMartin Storsjö2013-09-22
| | | | | | | | Fragmenting blindly to a certain duration isn't a good choice if one should be able to switch between different qualities, therefore default to keyframes instead. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Set all implicit flags immediately in mov_write_headerMartin Storsjö2013-09-22
| | | | | | | | This makes sure other sanity checks for conflicting options can work properly, e.g. for the conflict between the faststart flag when using the ismv mode. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Set mov->mode earlier in mov_write_headerMartin Storsjö2013-09-22
| | | | | | | This allows simplifying some early checks that depend on the muxer mode. Signed-off-by: Martin Storsjö <martin@martin.st>
* tls: Do not abort on non-fatal TLS alerts with gnutlsMartin Storsjö2013-09-22
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* flv: Make onTextData parsing robustLuca Barbato2013-09-22
| | | | Certain streaming servers do not preserve the order of the fields.
* rtmp: Replace a magic number with a macroLuca Barbato2013-09-22
| | | | 11 is the RTMP header size.
* rtmp: Rewrite embedded flv handlingLuca Barbato2013-09-22
| | | | | | Use update_offset() as done for rtmp audio, video and notifications and read update and write the fields instead of replacing them in the rtmp packet and then memcpying it to the output buffer.
* rtmp: Refactor get_packetLuca Barbato2013-09-22
|
* rtmp: Support AMF_DATA_TYPE_MIXEDARRAYLuca Barbato2013-09-22
| | | | | | | | | And fix the AMF_DATA_TYPE_ARRAY parsing while at it. A MIXEDARRAY type, as the ARRAY, store the number of elements in an uint32 before the list. The ARRAY is strict and does not have an OBJECT terminator, MIXEDARRAY behaves like an OBJECT type and a different than stated number of element can be present.
* h264dec: Add .avc file name extensionVittorio Giovara2013-09-20
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* h264dec: K&R formatting cosmeticsVittorio Giovara2013-09-20
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* rtmp: Unbreak get_packetLuca Barbato2013-09-20
| | | | Commit 5626f994f273af80fb100d4743b963304de9e05c broke it.
* rtmpproto: Add a comment explaining the logic in handle_notifyMartin Storsjö2013-09-20
| | | | | | | This explains why the cleanup in 5626f994f was wrong and why ae0f316a was needed. Signed-off-by: Martin Storsjö <martin@martin.st>
* r3d: Add more input value validationMartin Storsjö2013-09-19
| | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* rl2: Avoid a division by zeroMartin Storsjö2013-09-19
| | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* wtv: Add more sanity checks for a length read from the fileMartin Storsjö2013-09-19
| | | | | | | | Also make sure the existing length check can't overflow. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* yop: Clear all references to the AVBuffer in the local AVPacketMartin Storsjö2013-09-19
| | | | | | | | | This makes sure that it doesn't try to free an AVBuffer belonging to an earlier packet when we free the local packet at the end. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* segafilm: Validate the number of audio channelsMartin Storsjö2013-09-19
| | | | | | | | This avoids divisions by zero later. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Use null buffers for measuring the amount of data to be writtenMartin Storsjö2013-09-19
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* aviobuf: Add functions for null buffersMartin Storsjö2013-09-19
| | | | | | | Null buffers are useful for simulating writing to a real buffer for the sake of measuring how many bytes are written. Signed-off-by: Martin Storsjö <martin@martin.st>
* asfenc: mux chapters in ASF files using an ASF "marker" sectionVladimir Pantelic2013-09-19
| | | | | | | | ASF markers only have a start time, so we lose the chapter end times, but that is ASF for you Signed-off-by: Vladimir Pantelic <vladoman@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* asfenc: remember send time and offset of the index entriesVladimir Pantelic2013-09-19
| | | | | Signed-off-by: Vladimir Pantelic <vladoman@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* asfenc: add ASF_Reserved_4 as defined in section 10.10 of the ASF specVladimir Pantelic2013-09-19
| | | | | Signed-off-by: Vladimir Pantelic <vladoman@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* asfdec: replace magic constant with DATA_HEADER_SIZEVladimir Pantelic2013-09-19
| | | | | Signed-off-by: Vladimir Pantelic <vladoman@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* asfdec: substract preroll time from marker presentation timeVladimir Pantelic2013-09-19
| | | | | | | this was forgotten when we changed ASF to not output the preroll time Signed-off-by: Vladimir Pantelic <vladoman@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* idroqdec: Make sure a video stream has been allocated before returning packetsMartin Storsjö2013-09-19
| | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Unbreak handle_notifyLuca Barbato2013-09-19
| | | | Commit 5626f994f273af80fb100d4743b963304de9e05c broke it.
* Add a WebP decoderJustin Ruggles2013-09-18
| | | | | Container and lossy decoding by Aneesh Dogra <aneesh@sugarlabs.org> Lossless decoding by Justin Ruggles <justin.ruggles@gmail.com>
* avformat: Use av_reallocp() where suitableAlexandra Khirnova2013-09-18
| | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* rmdec: Validate the fps valueMartin Storsjö2013-09-18
| | | | | | | | Abort if it is invalid if strict error checking has been requested. Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Add an option for omitting the tfhd base offsetMartin Storsjö2013-09-17
| | | | | | | | | | This makes the output fragments independent of their position in the output stream, making the output work better when streamed. QuickTime Player doesn't support fragmented mp4 without the base data offset, though. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Write the moof atom in two passesMartin Storsjö2013-09-17
| | | | | | | | | | | This is a bit more work, but avoids having to fill in the data offset field afterwards instead of directly when the rest of the trun atom is written. This simplifies future cases where this field needs to be set to something different. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Support reading interleaved chunks.Josh Allmann2013-09-17
| | | | | | | | | | | | | | | A given packet won't always come in contiguously; sometimes they may be broken up on chunk boundaries by packets of another channel. This support primarily involves tracking information about the data that's been read, so the reader can pick up where it left off for a given channel. As a side effect, we no longer over-report the bytes read if (toread = MIN(size, chunk_size)) == size Signed-off-by: Martin Storsjö <martin@martin.st>
* xmv: Add more sanity checks for parameters read from the bitstreamMartin Storsjö2013-09-17
| | | | | | | | | | | Since the number of channels is multiplied by 36 and assigned to to a uint16_t, make sure this calculation didn't overflow. (In certain cases the calculation could overflow leaving the truncated block_align at 0, leading to divisions by zero later.) Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmpproto: Extend a comment to explain the prev_pkt arrays rolesMartin Storsjö2013-09-17
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmpproto: Consistently use the right prev_pkt arrayMartin Storsjö2013-09-17
| | | | | | | prev_pkt[0] is used for input packets, while prev_pkt[1] is used for output. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmpproto: Check for the right return codeMartin Storsjö2013-09-17
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Don't use a negative duration for setting other fieldsMartin Storsjö2013-09-17
| | | | | | | | | | Some files have the duration set to -1 in the mdhd atom, more or less legitimately. (We produce such files ourselves, for the initial duration in fragmented mp4 files.) Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* oggparseogm: Convert to use bytestream2Martin Storsjö2013-09-17
| | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* matroskadec: Verify realaudio codec parametersMartin Storsjö2013-09-17
| | | | | | Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: rename main_channel_id to stream_id.Josh Allmann2013-09-17
| | | | | | | This more closely corresponds to the usage of the field. Its usage here is unrelated to the channel ID. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Follow Flash player numbering for channels.Josh Allmann2013-09-17
| | | | | | | | | | | Channel 4 is typically used by the Flash player to transmit audio, channel 6 for video, and various stream-specific invokes get sent over channel 8, which is designated the source channel. This more closely matches the behavior of the Flash player, including the transmission of play requests over channel 8. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmp: Send video on a separate channel.Josh Allmann2013-09-17
| | | | | | | | | | | Sending non-monotonic packets (e.g. when the audio and video streams are monotonic within themselves but not muxed monotonically) will lead to negative values the RTMP timestamp field (where timestamps are transmitted only as deltas for each channel), and this delta can end up being incorrectly written as a large unsigned number. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Make probe_codec return an error codeAlexandra Khirnova2013-09-16
| | | | | | This allows handling errors from av_realloc properly. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Don't explicitly flush after each written packet in muxersClément Bœsch2013-09-16
| | | | | | | | Since 596e5d4783, this is not necessary anymore. It also allows to actually disable the flushing, improving write performance (but possibly giving worse latency in real-time streaming). Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: Add a flag to enable/disable per-packet flushingLuca Barbato2013-09-16
| | | | | | | | | This is enabled by default and can be disabled with "-fflags -flush_packets". Inspired by a patch from Nicolas George <nicolas.george@normalesup.org>. Signed-off-by: Martin Storsjö <martin@martin.st>