- 28 Nov, 2014 4 commits
-
-
Martin Storsjö authored
Currently, when streaming to an RTMP server, any time a packet of type RTMP_PT_NOTIFY is encountered, the packet is prepended with @setDataFrame before it gets sent to the server. This is incorrect; only packets for onMetaData and |RtmpSampleAccess should invoke @setDataFrame on the RTMP server. Specifically, the current bug manifests itself when trying to stream onTextData or onCuePoint invocations. This fix addresses that problem and ensures that the @setDataFrame is only prepended for onMetaData and |RtmpSampleAccess. Since data is fed to the rtmp_write function in smaller pieces (depending on the calling IO buffer size), we can't generally assume that the whole packet (or even the whole command string) is available at once, therefore we can only check the command string once the full packet has been transferred to us for sending. Based on a patch by Jeffrey Wescott. Signed-off-by: Martin Storsjö <martin@martin.st>
-
Martin Storsjö authored
We try to avoid mixing av_malloc with av_realloc, since av_malloc may be implemented with functions that can't (formally) be mixed with the functions used in av_realloc. Signed-off-by: Martin Storsjö <martin@martin.st>
-
Martin Storsjö authored
Signed-off-by: Martin Storsjö <martin@martin.st>
-
Martin Storsjö authored
Signed-off-by: Martin Storsjö <martin@martin.st>
-
- 27 Nov, 2014 7 commits
-
-
Anton Khirnov authored
Fixes invalid writes with invalid multichannel streams. CC:libav-stable@libav.org
-
Kieran Kunhya authored
Signed-off-by: Anton Khirnov <anton@khirnov.net>
-
wm4 authored
The buffer pool has to atomically add and remove entries from the linked list of available buffers. This was done by removing the entire list with a CAS operation, working on it, and then setting it back again (using a retry-loop in case another thread was doing the same thing). This could effectively cause memory leaks: while a thread was working on the buffer list, other threads would allocate new buffers, increasing the pool's total size. There was no real leak, but since these extra buffers were not needed, but not free'd either (except when the buffer pool was destroyed), this had the same effects as a real leak. For some reason, growth was exponential, and could easily kill the process due to OOM in real-world uses. Fix this by using a mutex to protect the list operations. The fancy way atomics remove the whole list to work on it is not needed anymore, which also avoids the situation which was causing the leak. Signed-off-by: Anton Khirnov <anton@khirnov.net>
-
Anton Khirnov authored
Also add no-op fallbacks when threading is disabled. This helps keeping the code clean if Libav is compiled for targets without threading. Since we assume that no threads of any kind are used in such configurations, doing nothing is ok by definition. Based on a patch by wm4 <nfxjfg@googlemail.com>.
-
Martin Storsjö authored
This reverts commit b9d08c77. After taking MoveFileEx into use, we can replace files with renames on windows as well. Signed-off-by: Martin Storsjö <martin@martin.st>
-
Martin Storsjö authored
This allows getting the normal unix semantics, where a rename allows replacing an existing file. Based on a suggestion by Reimar Döffinger. Signed-off-by: Martin Storsjö <martin@martin.st>
-
Martin Storsjö authored
This doesn't add any dependency on library internals, since this only is a static inline function that gets built into each of the calling functions - this is only to reduce the code duplication. Signed-off-by: Martin Storsjö <martin@martin.st>
-
- 26 Nov, 2014 2 commits
-
-
Martin Storsjö authored
This allows setting the right fragment number if doing random-access writing of fragments, and also allows reading the current sequence number. Signed-off-by: Martin Storsjö <martin@martin.st>
-
Martin Storsjö authored
This allows creating a later mp4 fragment without sequentially writing the earlier ones before (when called from a segmenter). Normally when writing a fragmented mp4 file sequentially, the first timestamps of a fragment are adjusted to match the end of the previous fragment, to make sure the timestamp is the same, even if it is calculated as the sum of previous fragment durations. (And for the first packet in a file, the offset of the first packet is written using an edit list.) When writing an individual mp4 fragment discontinuously like this (with potentially writing the earlier fragments separately later), there's a risk of getting a gap in the timeline if the duration field of the last packet in the previous fragment doesn't match up with the start time of the next fragment. Using this requires setting -avoid_negative_ts make_non_negative (or -avoid_negative_ts 0). Signed-off-by: Martin Storsjö <martin@martin.st>
-
- 25 Nov, 2014 10 commits
-
-
Martin Storsjö authored
This fixes "make checkheaders". Signed-off-by: Martin Storsjö <martin@martin.st>
-
Michael Niedermayer authored
4775 decicycles -> 3688 decicycles
-
Michael Niedermayer authored
CC: libav-stable@libav.org Bug-Id: CID 1135770 / CID 1135771
-
Luca Barbato authored
As done for all the other codecs not calling it indirectly. CC: libav-stable@libav.org Bug-Id: CID 1135770 / CID 1135771
-
Michael Niedermayer authored
`is_intra` is a 6bits bitfield. CC: libav-stable@libav.org Bug-Id: CID 1194380 / CID 1194381 Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
-
Luca Barbato authored
Keep the code as similar as possible across the codepaths to ease spotting it for factorization. Based on a patch from Michael Niedermayer <michaelni@gmx.at>.
-
Luca Barbato authored
The code currently set the information in at least 4 places, spare some pointless loops. Make the code in the loop a little uniform to make easier factorize it out later.
-
Michael Niedermayer authored
CC: libav-stable@libav.org Bug-Id: CID 1251347
-
Michael Niedermayer authored
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-
Vittorio Giovara authored
CC: libav-stable@libav.org Bug-Id: CID 1245699 / CID 1245700
-
- 24 Nov, 2014 14 commits
-
-
Martin Storsjö authored
This makes sure that the internal utf8 path names are handled properly - the normal file handling functions assume path names are in the native codepage, which isn't utf8. This assumes that the tools outside of lavf don't use the mkdir definition. (The tools don't do the same reading of command line parameters as wchar either - they probably won't handle all possible unicode file parameters properly, but at least work more predictably if no utf8/wchar conversion is involved.) This is moved further down in os_support.h, since windows.h shouldn't be included before winsock2.h, while io.h needs to be included before the manual defines for lseek functions. Signed-off-by: Martin Storsjö <martin@martin.st>
-
Martin Storsjö authored
On windows, rename(2) will fail if the target file exists. On unix this trick is used to make sure that people reading the file either will get the full previous file, or the full new version of the file, but no intermediate version. Signed-off-by: Martin Storsjö <martin@martin.st>
-
Uwe L. Korn authored
Signed-off-by: Martin Storsjö <martin@martin.st>
-
Martin Storsjö authored
This makes sure that segments actually start at a keyframe (and makes sure we don't split segments twice in a row, with one segment consisting of only a handful of packets), when one stream uses b-frames while another one doesn't. Signed-off-by: Martin Storsjö <martin@martin.st>
-
Martin Storsjö authored
This fixes playback with dash.js, when the input is one separate mp4 file per track. Signed-off-by: Martin Storsjö <martin@martin.st>
-
Vittorio Giovara authored
Fixes a wordly warning from clang -Wsometimes-uninitialized.
-
Michael Niedermayer authored
Prevent NULL dereference. CC: libav-stable@libav.org Bug-Id: CID 703669 Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
-
Vittorio Giovara authored
'ret' can only be used without initialization if s->height <= 0, which can only happen if avctx->height <= 0, which is validated elsewhere. Doesn't hurt to still initialize it though. CC: libav-stable@libav.org Bug-Id: CID 732296
-
Luca Barbato authored
At least 8 bytes are needed (Mono audio). Bug-Id: CID 741418 CC: libav-stable@libav.org
-
Vittorio Giovara authored
Bug-Id: CID 1238993
-
Vittorio Giovara authored
Also move the check in the case it is actually used. CC: libav-stable@libav.org Bug-Id: CID 1087090
-
Vittorio Giovara authored
-
Vittorio Giovara authored
CC: libav-stable@libav.org Bug-Id: CID 29261
-
Vittorio Giovara authored
CC: libav-stable@libav.org Bug-Id: CID 700556 / CID 700557 / CID 700558
-
- 22 Nov, 2014 3 commits
-
-
Martin Storsjö authored
Don't write any bitrate attribute if it isn't known. As long as one doesn't want automatic bitrate switching, playback can work just fine even if it isn't set. If strict standard compliance is requested, this is still considered an error, since the attribute is mandatory according to the spec. Based on a patch by Rodger Combs. Signed-off-by: Martin Storsjö <martin@martin.st>
-
Martin Storsjö authored
The same file already includes this header a few lines further above. Signed-off-by: Martin Storsjö <martin@martin.st>
-
Michael Niedermayer authored
Signed-off-by: Martin Storsjö <martin@martin.st>
-