summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
...
* nut: Provide more information on failureLuca Barbato2015-11-25
|
* rtsp: Log getaddrinfo failuresLuca Barbato2015-11-25
| | | | And forward the logging contexts when needed.
* udp: Provide additional information on getaddrinfo failureLuca Barbato2015-11-25
|
* udp: Use the logging contextLuca Barbato2015-11-25
|
* rtsp: Do not assume getnameinfo cannot failLuca Barbato2015-11-25
| | | | And properly report the error when it happens.
* movenc-test: Fix integer overflowsMichael Niedermayer2015-11-24
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* asfdec: handle the case when the stream index has an invalid value betterAlexandra Hájková2015-11-23
| | | | | | | | | | The demuxer returned INVALIDDATA and failed to demux the remaining data when an invalid stream index was read, now it just skips the asf packet for the stream with an invalid stream index and continues demuxing. Reported-By: Hendrik Leppkes Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* oggparsespeex: Fix unchecked mallocDerek Buitenhuis2015-11-23
| | | | | Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com> Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* movenc: add fallback audio track tref supportJohn Stebbins2015-11-18
| | | | | | | | | | | | | This feature allows making associations between audio tracks that apple players recognize. E.g. when an ac3 track has a tref that points to an aac track, devices that don't support ac3 will automatically fall back to the aac track. Apple used to *guess* these associations, but new products (AppleTV 4) no longer guess and this association can only be made explicitly now using the "fall" tref. Signed-off-by: Anton Khirnov <anton@khirnov.net>
* avformat: expose av_stream_new_side_data helperJohn Stebbins2015-11-18
| | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* lavf: document that passing valid timestamps to muxers is now mandatoryAnton Khirnov2015-11-18
| | | | Also, extend the documentation about setting timestamps.
* segafilm: Fix current_sample after seeking and avio_seek return typeMichael Niedermayer2015-11-14
| | | | Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
* rtmpcrypt: Provide the xtea keys in little endian format for consistencyMartin Storsjö2015-11-13
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* rtmpcrypt: Do the xtea decryption in little endian modeMartin Storsjö2015-11-13
| | | | | | | | | | | The XTEA algorithm operates on 32 bit numbers, not on byte sequences. The XTEA implementation in libavutil is written assuming big endian numbers, while the rtmpe signature encryption assumes little endian. This fixes rtmpe communication with rtmpe servers that use signature type 8 (XTEA), e.g. crunchyroll. Signed-off-by: Martin Storsjö <martin@martin.st>
* mov: Drop dref when unable to parseVittorio Giovara2015-11-12
| | | | | | | Some entries might be either empty or contain types we do not parse (eg. 'url '). In both cases, if an 'alis' is not the first entry, external references are not loaded, so make sure that the array starts with an 'alis' dref.
* mov: Correctly store dref pathsVittorio Giovara2015-11-12
| | | | | | | | | | Rather than reading the alternate absolute path version from dref type 18, make sure that 0s are considered as '/'. These values are sometimes present in the full path, and are mistakenly interpreted as line terminators othewise. With the correct handling of this dref type, parsing type 18 is not needed any more.
* aiff: Support demuxing G.722 streamsCarl Eugen Hoyos2015-11-12
|
* thp: set duration for audio stream tooPaul B Mahol2015-11-12
| | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* movenc: Add a unit test for signaling of the track start timesMartin Storsjö2015-11-11
| | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Allow setting start_dts/start_cts before writing actual packetsMartin Storsjö2015-11-11
| | | | | | | | | | | | | | | | | By writing a zero-sized packet, the caller can communicate the start_dts/start_cts for the stream without actually writing the first packet. This allows doing random-access writing of fragments when the start dts of the stream isn't zero, so that the edit list in the moov is written based on timestamps from the nominal start time signaled via the zero-sized packet, while the first proper packet written corresponds to a later fragment. To avoid potential unexpected behaviour, empty packets only set start_dts if the frag_discont flag is set. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Add a unit test for frag_discont with edit listsMartin Storsjö2015-11-11
| | | | | | | This tests the case where the muxer correctly guesses that a stream starts at pts=0. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Assume streams starting at pts=0 for discontinuous fragments with ↵Martin Storsjö2015-11-11
| | | | | | | | | | editlists This allows producing fragments discontinously where the video stream has b-frames (but starts at pts=0), but doesn't work for the cases with audio with preroll. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Add an API unit test for fragmenting options/callsMartin Storsjö2015-11-10
| | | | | | | | | | | | | | | | | Contrary to the normal fate tests that run via avconv, this tests nontrivial call sequences that are only doable via the API (mainly for different corner cases when using the muxer for segmenting). The test muxes fake packet data (with extradata that looks enough like proper data to make the file be viewable with e.g. boxdumper) and checks the hash of the produced files. The test also verifies that fragments produced via different call sequences remain identical (to avoid e.g. updating the output hashes and suddenly having fragments that used to be identical suddenly diverging), for fragments written with frag_discont and/or delay_moov. Signed-off-by: Martin Storsjö <martin@martin.st>
* movenc: Automatically flush after writing the initial moovMartin Storsjö2015-11-10
| | | | | | | | In most other cases when writing fragmented mp4 files, the output IO context is flushed after each fragment. Also flush it after writing the initial moov, to have it behave in the same way. Signed-off-by: Martin Storsjö <martin@martin.st>
* lavf: deprecate compute_pkt_fields2Anton Khirnov2015-11-09
| | | | | | | | | All encoders set pts and dts properly now (and have been doing that for a while), so there is no good reason to do any timestamp guessing in the muxer. The newly added AVStreamInternal will be later used for storing all the private fields currently living in AVStream.
* lavf: factor out freeing an AVStreamAnton Khirnov2015-11-08
| | | | It will be needed in other functions.
* lavf: initialize cur_dts to AV_NOPTS_VALUE for muxingAnton Khirnov2015-11-08
| | | | The reasoning for setting it to zero only applies to demuxing.
* segafilm: drop the "song and dance" for cinepakMichael Niedermayer2015-11-06
| | | | | | | | | | This seems not to do anything any more since a long time, and removing it avoids using uninitialized memory. Also change the error value forwarding as done everywhere else. Partly fixes: msan_uninit-mem_7fb7d24780d0_2744_R03T.CAK Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* segafilm: set video and audio stream durationPaul B Mahol2015-11-06
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* segafilm: implement seekingPaul B Mahol2015-11-06
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* mov: detect cover art pictures by contentwm42015-11-03
| | | | | | | | | | | | I've got some m4a samples that had jpeg cover art marked as png. Since these files were supposedly written by iTunes, and other software can read it (e.g. clementine does), this should be worked around. Since png has a very simple to detect header, while it's apparently a real pain to detect jpeg in the general case, try to detect png and assume jpeg otherwise. Not bothering with bmp, as I have no test case. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* msnwc_tcp: Use the correct return valuesLuca Barbato2015-11-02
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* cosmetics: msnwc_tcp: ReformatLuca Barbato2015-11-02
| | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* msnwc_tcp: Correctly report failureLuca Barbato2015-11-02
| | | | | | | | And prevent a memory leak CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* nut: Use the correct codec_tag when multiple are availableLuca Barbato2015-11-02
| | | | | | | | | | Some codecs use the codec_tag to signal specific information and picking the first one would lead to a broken file. Bug-Id: 883 CC: libav-stable@libav.org Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* omadec: Fix position of opening parenthesisVittorio Giovara2015-10-30
|
* os_support: Don't try to return the service name as a string in getnameinfoMartin Storsjö2015-10-30
| | | | | | | | | | | | | Some systems may be lacking getservbyport; the previous ifdef wasn't quite enough since it still assumed that struct servent was defined, as pointed out by Clément Gregoire. Simply remove the possibility to return non-numeric services in getnameinfo; no caller of getnameinfo within libavformat currently try to use getnameinfo for retrieving the port number without NI_NUMERICSERV, and falling back on getservbyport may be non-threadsafe. Signed-off-by: Martin Storsjö <martin@martin.st>
* avpacket: Deprecate av_dup_packetLuca Barbato2015-10-26
| | | | | As documented, `av_dup_packet` is broken by design, `av_packet_ref` matches the AVFrame ref-counted API and can be safely used instead.
* avformat: Rework add_to_pktbufLuca Barbato2015-10-26
| | | | | Make it return an error and check its return value when it is used. Simplify the usage by calling `av_packet_ref` internally when needed.
* avpacket: Replace av_free_packet with av_packet_unrefLuca Barbato2015-10-26
| | | | | | | `av_packet_unref` matches the AVFrame ref-counted API and can be used as a drop in replacement. Deprecate `av_free_packet`.
* avformat: Always return ref-counted AVPacketLuca Barbato2015-10-26
| | | | And drop the av_dup_packet from the input_thread.
* innoHeim/Rsupport Screen Capture Codec decoderVittorio Giovara2015-10-23
| | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* mpjpeg: Cope with multipart lacking the initial CRLFLuca Barbato2015-10-23
| | | | | | | | | Some server in the wild do not put the boundary at a newline as rfc1347 7.2.1 states. Cope with that by reading a line and if it is not empty reading a second one. Reported-By: bitingsock
* img2enc: Make sure the images are atomically writtenLuca Barbato2015-10-23
| | | | | Users that want to generate a live-preview and serve it would otherwise get partial images.
* movenc: Honor flush requests with delay_moov, when some tracks lack samplesMartin Storsjö2015-10-23
| | | | | | | | This also makes sure that a fragmented file without the empty_moov flag (i.e. with a non-empty initial moov fragment) actually gets written, if some of the tracks turn out to not have any samples. Signed-off-by: Martin Storsjö <martin@martin.st>
* rtsp: Allow $ as interleaved packet indicator before a complete response headerMartin Storsjö2015-10-23
| | | | | | | | | | | | | | | Some RTSP servers ("HiIpcam/V100R003 VodServer/1.0.0") respond to our keepalive GET_PARAMETER request by a truncated RTSP header (lacking the final empty line to indicate a complete response header). Prior to 764ec70149, this worked just fine since we reacted to the $ as interleaved packet indicator anywhere. Since $ is a valid character within the response header lines, 764ec70149 changed it to be ignored there. But to keep compatibility with such broken servers, we need to at least allow reacting to it at the start of lines. Signed-off-by: Martin Storsjö <martin@martin.st>
* Replace any remaining avpicture function with imgutilsVittorio Giovara2015-10-21
| | | | | | avpicture_get_size() -> av_image_get_buffer_size() Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* httpauth: Add space after commas in HTTP/RTSP auth headerAndrey Utkin2015-10-14
| | | | | | | | | | | This fixes access to Grandstream cameras, which return 401 otherwise. VLC sends Authorization: header with spaces between parameters, and it is known to work with Grandstream devices and broad range of other HTTP and RTSP servers, so author considers switching to such behaviour safe. See RFC 2617 (HTTP Auth). Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* rtmpproto: Write correct flv packet sizes at the end of packetsMichael Niedermayer2015-10-14
| | | | | | | In one case it was written as zero, one case left it uninitialized, missed the 11 bytes for the flv header. Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* avformat: Do not use AVFMT_RAWPICTURELuca Barbato2015-10-13
| | | | | There are no formats supporting it anymore and it is deprecated. Update the documentation accordingly.