summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* lavf: move internal fields from public to internal contextwm42015-02-10
| | | | | | | This is not an API change; the fields were explicitly declared private before. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* mpegts: relax restrictions on matching the packet start in read_headerAnton Khirnov2015-02-10
| | | | | | | | | | | analyze() is currently called both when probing and from read_header(). It determines the packet start by looking for the sync byte, followed by unset Transport Error Indicator and valid adaptation_field_control. This makes sense to do when probing, but once we already know the format is MPEG-TS, it is counterproductive to be so strict -- e.g. in some files the TEI might be set and analyze() might get called with a smaller buffer than the one used for probing, resulting in a failure.
* lavf: remove unused codewm42015-02-08
| | | | | | | | | | | | | Nothing uses it, and it provides no public API. Archeological finds: Commit 101036adb9 added the API. Commit a8dd8dc6e9 made mpegts.c use it. Commit af8aae3fa3 disabled it by default in mpegts.c. Commit ae2bb52cd2 removed all uses of this from mpegts.c. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* oma: Report a timestampLuca Barbato2015-02-07
| | | | | | Reported-By: jb@videolan.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* r3d: Fix pos typeLuca Barbato2015-02-03
| | | | | | | avio_tell can return a negative number. Bug-Id: CID 1265715 CC: libav-stable@libav.org
* tta: Fix framepos and start_offset typesVittorio Giovara2015-02-03
| | | | | | | Also propagate errors. CC: libav-stable@libav.org Bug-Id: CID 1238812
* isom: Decode Prores 4444 XQ with the existing Prores decoderCarl Eugen Hoyos2015-02-03
| | | | | | | The frames seem to contain a higher bitrate which our decoder is able to handle. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* mov: Implement parsing of the "HandlerName" from the MP4 HDLR atomHendrik Leppkes2015-02-03
| | | | | | | | | | | | | | | | | This atom typically is used for a track title. The handler name is stored as a Pascal string in the QT specs (first byte is the length of the string), so do not export it. A second length check based on the first character is added to avoid overwriting an already specified handler_name (it happens with YouTube videos for instance, the handler_name get masked), or specifying an empty string metadata. The Pascal string fix and the second length check are written by Clément Bœsch <clement.boesch@smartjog.com>. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* siff: Return more meaningful error valuesDiego Biurrun2015-02-03
|
* siff: K&R formatting cosmeticsDiego Biurrun2015-02-03
|
* ogg: Provide an option to offset the serial numberLuca Barbato2015-02-01
| | | | | The ogg serial number doubles as codec id and sequence value for concatenated samples.
* yuv4mpegdec: initialize field_order in yuv4_read_header()Vittorio Giovara2015-01-29
| | | | | CC: libav-stable@libav.org Bug-Id: CID 1265721
* avio: Do not consider the end-of-buffer position validLuca Barbato2015-01-28
| | | | | | | | | | | | | | Trigger a refill if the seek action moves the pointer at the end of the buffer. Before this patch the read action following the seek would trigger the refill, while write action would write outside the buffer. In the Libav codebase few muxers seek forward outside of what already has been written so it is quite unlikely to experience the problem with the default buffer size. CC: libav-stable@libav.org
* nuv: validate image sizeVittorio Giovara2015-01-27
| | | | | | | Avoid a division by zero. CC: libav-stable@libav.org Bug-Id: CID 717750
* nsvdec: validate channels and samplerateVittorio Giovara2015-01-27
| | | | | | | Avoid a division by zero. CC: libav-stable@libav.org Bug-Id: CID 717749
* mov: export audio service type as side dataAnton Khirnov2015-01-27
|
* lavf: add a convenience function for adding side data to a streamAnton Khirnov2015-01-27
|
* nutenc: do not use has_b_framesAnton Khirnov2015-01-27
| | | | | It is unreliable, especially when the stream codec context is not the encoding context. Use the codec descriptor properties instead.
* avidec: do not export stream_codec_tagAnton Khirnov2015-01-27
| | | | Handle its only existing use case internally.
* segment: Check av_get_frame_filename() return valueVittorio Giovara2015-01-23
| | | | | CC: libav-stable@libav.org Bug-Id: CID 1265713
* hlsproto: Properly close avio buffer in case of errorVittorio Giovara2015-01-23
| | | | | | | Fix a memory leak. CC: libav-stable@libav.org Bug-Id: CID 717999
* mov: Do not compute negative SAR valuesVittorio Giovara2015-01-23
| | | | | | | | This partially reverts cf70ba37ba74089a18295b29e77dead0a3222c9e, since it didn't take into account when rotation is 0, but there is another valid operation (eg. translation) in the matrix. Found-by: Michael Niedermayer <michaelni@gmx.at>
* rtspdec: Consistently use rtsp_hd_out for writingMartin Storsjö2015-01-23
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* dashenc: Use inttypes.h macros for format strings instead of %lldMartin Storsjö2015-01-22
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* dashenc: Fix format string generationRodger Combs2015-01-22
| | | | | | | Previously this always used the "lld" format for all parameters, not only time parameters. Signed-off-by: Martin Storsjö <martin@martin.st>
* smoothstreamingenc: Add a missing "goto fail"Michael Niedermayer2015-01-19
| | | | | | | | This goto wasn't necessary originally, but it should have been added when the write_manifest call was added in 8e276378. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* aea: Return proper error code on invalid headerNidhi Makhijani2015-01-16
|
* rtmppkt: Repeat the full 32 bit timestamp for chunking continuation packetsMartin Storsjö2015-01-15
| | | | | | | | | | | | | | | | | | This fixes sending chunked packets (packets larger than the output chunk size, which often can be e.g. 4096 bytes) with a timestamp delta (or absolute timstamp, if it's a timestamp step backwards, or the first packet of the stream) larger than 0xffffffff. The RTMP spec explicitly says (in section 5.3.1.3.) that packets of type 3 (continuation packets) should include this field, if the previous non-continuation packet had it included. The receiving code handles these packets correctly. Pointed out by Cheolho Park. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* id3v2: fix reading v2.2 attached picturesAnton Khirnov2015-01-14
| | | | | In v2.2, the picture type is not a zero-terminated string, but has a constant size of 3 bytes.
* id3v2: add names to the parameters of ID3v2EMFunc.readAnton Khirnov2015-01-14
| | | | Some of them are not immediately obvious.
* id3v2: constify the 'tag' parameter to special metadata parsing callbackAnton Khirnov2015-01-14
| | | | Those functions should not ever modify it.
* mov: Check angle rather than full matrix when updating SARVittorio Giovara2015-01-14
| | | | | | | | | | | | When the display matrix is not the identity one, but the rotation angle is zero, there is no need to update the sample aspect ratio. Otherwise, it is possible to obtain negative values which interferes with transcoding in later stages. This kind of behaviour is reproducible on mov files with "major_brand: MSNV". CC: libav-stable@libav.org Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* img2dec: correctly use the parsed value from -start_numberVittorio Giovara2015-01-14
| | | | | | | Previously the image sequence was always starting from the minimum number rather than the requested one. CC: libav-stable@libav.org
* matroskaenc: refuse to write AAC without valid extradataAnton Khirnov2015-01-09
|
* mpeg: Remove unused fieldLuca Barbato2015-01-07
|
* segment: Fix the failure pathsLuca Barbato2015-01-07
| | | | | | | | | A failure in segment_end() or segment_start() would lead to freeing a dangling pointer and in general further calls to seg_write_packet() or to seg_write_trailer() would have the same faulty behaviour. CC: libav-stable@libav.org Reported-By: luodalongde@gmail.com
* movenc: Fix a typo in a commentMartin Storsjö2015-01-06
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Readd an accidentally removed conditionMartin Storsjö2015-01-06
| | | | | | | This was removed accidentally as part of 847bf598. This could cause groundless warning logging. Signed-off-by: Martin Storsjö <martin@martin.st>
* isom: add 'mp1v' fourccJustin Ruggles2015-01-06
| | | | | | As referenced in the CoreMedia API docs. Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* movenc: Enable editlists by default if delay_moov is enabledMartin Storsjö2015-01-04
| | | | | | | Being able to write editlists properly is one of the main points in the delay_moov flag. Signed-off-by: Martin Storsjö <martin@martin.st>
* libavformat: Check for malloc failures in avformat_new_streamMartin Storsjö2015-01-04
| | | | | CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* libavformat: Remove a misleading/incorrect commentMartin Storsjö2015-01-04
| | | | | | | | This comment can be traced back to the initial commit from 2001, and it seemed to be misleading/incorect already back then. (It was used for normal, non-raw file formats already then.) Signed-off-by: Martin Storsjö <martin@martin.st>
* avisynth: Use RTLD_LOCAL instead of RTLD_GLOBALMartin Storsjö2015-01-03
| | | | | | | There shouldn't be any need to add the loaded libraries to the global symbol namespace. Signed-off-by: Martin Storsjö <martin@martin.st>
* dashenc: Use pts for MPD timeline timestampsMartin Storsjö2015-01-03
| | | | | | | | | | | | | | | This should be more correct. This also should give more sensible switching between video streams with different amount of b-frame delay. The current dash.js release (1.2.0) fails to start playback of such files from the start (if the start pts is > 0), but this has been fixed in the current git version of dash.js. Also enable the use of edit lists, so that streams in many cases start at pts=0. Signed-off-by: Martin Storsjö <martin@martin.st>
* dashenc: Use delay_moovMartin Storsjö2015-01-03
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Get rid of a hack for updating the dvc1 atomMartin Storsjö2015-01-03
| | | | | | | Use the more generic approach with the delay_moov flag, instead of having a update mechanism specific to this one single atom. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Add an option for delaying writing the moov with empty_moovMartin Storsjö2015-01-03
| | | | | | | | | | | | | | | | | | | | | | | | | This delays writing the moov until the first fragment is written, or can be flushed by the caller explicitly when wanted. If the first sample in all streams is available at this point, we can write a proper editlist at this point, allowing streams to start at something else than dts=0. For AC3 and DNXHD, a packet is needed in order to write the moov header properly. This isn't added to the normal behaviour for empty_moov, since the behaviour that ftyp+moov is written during avformat_write_header would be changed. Callers that split the output stream into header+segments (either by flushing manually, with the custom_frag flag set, or by just differentiating between data written during avformat_write_header and the rest) will need to be adjusted to take this option into use. For handling streams that start at something else than dts=0, an alternative would be to use different kinds of heuristics for guessing the start dts (using AVCodecContext delay or has_b_frames together with the frame rate), but this is not reliable and doesn't necessarily work well with stream copy, and wouldn't work for getting the right initialization data for AC3 or DNXHD either. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Use start_dts/cts instead of cluster[0] for writing edit listsMartin Storsjö2015-01-03
| | | | | | | This allows writing edit lists even when track->entry == 0, if the start times have been set. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Remove an unnecessary condition when flushing fragmentsMartin Storsjö2015-01-03
| | | | | | | | | | | If fragments == 0 it means we haven't written any moov atom yet. If the empty_moov flag is set, we already have written an empty moov atom at startup. Thus, the check for empty_moov is redundant. This is in preparation for allowing writing the moov atom later, even when using the empty moov flag. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Factorize writing ftyp and other identification tags to a separate ↵Martin Storsjö2015-01-03
| | | | | | function Signed-off-by: Martin Storsjö <martin@martin.st>