summaryrefslogtreecommitdiff
path: root/libavformat
Commit message (Collapse)AuthorAge
* Merge commit '4f6cd883f06f7893a2b60a41e7a4f8ae633dac2f'Michael Niedermayer2015-03-01
|\ | | | | | | | | | | | | * commit '4f6cd883f06f7893a2b60a41e7a4f8ae633dac2f': rtpenc: Don't set max_frames_per_packet based on the packet frame size or frame rate Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Don't set max_frames_per_packet based on the packet frame size or ↵Martin Storsjö2015-02-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | frame rate Instead check the timestamps while muxing, to avoid buffering a too long timestamp range into one single packet. This makes the AMR and AAC packetization slightly less efficient, since we set a possibly unnecessarily high max_frames_per_packet. (These packetizers end up doing a memmove of the TOC bytes if sending a packet before max_frames_per_packet is achieved, and we end up setting max_frames_per_packet to a value that should be high enough for most uses.) All packetizers that use max_frames_per_packet now set it either to a default value, or to a value calculated based on other parameters, so none of them rely on the previous default setting. For iLBC, copy one frame at a time, to allow checking the timestamp range for each of them - basically doing potentially multiple loops to simplify the code instead of trying to calculate the number of frames to buffer while honoring s1->max_delay. This is in preparation for reducing the coupling between libavformat and libavcodec, by not having the muxers use the encoder field frame_size (which may not be available during e.g. stream copy). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'bde2bba45c2f2df27a8534028bda09a6e7f835e2'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | | | | | | | * commit 'bde2bba45c2f2df27a8534028bda09a6e7f835e2': rtpenc: Restructure if statements in packetizers to simplify adding more conditions Conflicts: libavformat/rtpenc_xiph.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Restructure if statements in packetizers to simplify adding more ↵Martin Storsjö2015-02-28
| | | | | | | | | | | | | | | | | | | | conditions Factorize out the s->num_frames check at the start of the if statements, simplifying adding more alternative causes for sending the buffered frames. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'd4c7fc02f9f59e721e76debf4a595df529707545'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | * commit 'd4c7fc02f9f59e721e76debf4a595df529707545': rtpenc: Skip redundant initialization Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Skip redundant initializationMartin Storsjö2015-02-28
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'f8c01257f93ceda3e03bc4e540a51022d1e2bff2'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | * commit 'f8c01257f93ceda3e03bc4e540a51022d1e2bff2': rtpenc: Always do the default initialization regardless of codecs Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Always do the default initialization regardless of codecsMartin Storsjö2015-02-28
| | | | | | | | | | | | | | | | This avoids having to jump to the defaultcase in the switch. Manually override the stream time base back to 90 kHz for the few audio codecs that don't use the sample rate as time base (mp2, mp3). Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '11edeaea3293c41ecf577a330422eabba35f76a2'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | * commit '11edeaea3293c41ecf577a330422eabba35f76a2': rtpenc_xiph: Don't exclude headers from max_payload_size Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc_xiph: Don't exclude headers from max_payload_sizeMartin Storsjö2015-02-28
| | | | | | | | | | | | | | This makes things more consistent by using the variable in the same way as in all other packetizers. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '7c1e2e64667421f931ab48141517f19d309c7eea'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | | | | | | | * commit '7c1e2e64667421f931ab48141517f19d309c7eea': rtpenc_xiph: Use AV_WB16 instead of manual bitshifts Conflicts: libavformat/rtpenc_xiph.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc_xiph: Use AV_WB16 instead of manual bitshiftsMartin Storsjö2015-02-28
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'd16c8d28d4e2fca3af1054ffbf635c8cee755fc8'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | * commit 'd16c8d28d4e2fca3af1054ffbf635c8cee755fc8': rtpenc_aac: Use AV_WB16 instead of manual bitshifts Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc_aac: Use AV_WB16 instead of manual bitshiftsMartin Storsjö2015-02-28
| | | | | | | | | | | | This makes the code slightly more readable and understandable. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '9c9b0218e85fcd969308632f75af48a4ce229541'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | * commit '9c9b0218e85fcd969308632f75af48a4ce229541': rtpenc_aac: Merge a definition with a declaration Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc_aac: Merge a definition with a declarationMartin Storsjö2015-02-28
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '1fc64e2e07787bbca82a72c146588e850e6d098a'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | * commit '1fc64e2e07787bbca82a72c146588e850e6d098a': rtpenc: Write conditional statements on separate lines Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc: Write conditional statements on separate linesMartin Storsjö2015-02-28
| | | | | | | | | | | | | | Intentionally keeping some conditional statements on single lines in rtpenc_h263.c. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '0662440b991361fdb5e732712d997a73e4692e34'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | * commit '0662440b991361fdb5e732712d997a73e4692e34': rtpenc_aac: Set a default value for max_frames_per_packet at init Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc_aac: Set a default value for max_frames_per_packet at initMartin Storsjö2015-02-28
| | | | | | | | | | | | | | This avoids having to conditionally set the default within the packetizer function. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '12b3459979f5ea6481660cd2c99a0381e2b5ba37'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | * commit '12b3459979f5ea6481660cd2c99a0381e2b5ba37': rtpenc_amr: Use s->num_frames instead of s->buf_ptr - s->buf Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc_amr: Use s->num_frames instead of s->buf_ptr - s->bufMartin Storsjö2015-02-28
| | | | | | | | | | | | | | This doesn't fix any bug, but makes the code simpler for later patches, and more straightforward to read as is. Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit '98563953442560dd83aab938f86de3e5a22a891f'Michael Niedermayer2015-03-01
|\| | | | | | | | | | | | | * commit '98563953442560dd83aab938f86de3e5a22a891f': rtpenc_aac: Fix sending fragmented frames Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * rtpenc_aac: Fix sending fragmented framesMartin Storsjö2015-02-28
| | | | | | | | | | | | | | | | | | | | | | | | After sending a fragmented frame, len (s->buf_ptr - s->buf) isn't zero, while s->num_frames is zero as intended. Using s->num_frames makes it work as intended, and is less convoluted than keeping track of (resetting) s->buf_ptr. This avoids sending stray data after sending a fragmented aac packet. CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'b9d2d6843a49f9df1d1ae1afe817d9b48c445919'Michael Niedermayer2015-02-28
|\| | | | | | | | | | | | | | | | | | | * commit 'b9d2d6843a49f9df1d1ae1afe817d9b48c445919': tls: Pass AVOptions dictionaries through to the chained protocol Conflicts: libavformat/tls.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * tls: Pass AVOptions dictionaries through to the chained protocolMartin Storsjö2015-02-28
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'e14f98c62fdf8744b07419314095d1b3248cce75'Michael Niedermayer2015-02-28
|\| | | | | | | | | | | | | | | | | | | * commit 'e14f98c62fdf8744b07419314095d1b3248cce75': tcp: Clarify the units for the timeout avoptions Conflicts: libavformat/tcp.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * tcp: Clarify the units for the timeout avoptionsMartin Storsjö2015-02-28
| | | | | | | | Signed-off-by: Martin Storsjö <martin@martin.st>
* | Merge commit 'c86d8aed748adc3ba8df96fb1fe14aa45da77a31'Michael Niedermayer2015-02-28
|\| | | | | | | | | | | | | * commit 'c86d8aed748adc3ba8df96fb1fe14aa45da77a31': avio: Rename avclass symbols relating to avio Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avio: Rename avclass symbols relating to avioMartin Storsjö2015-02-28
| | | | | | | | | | | | | | Don't prefix them ffio_url, which is misleading, sounding too much like the urlprotocol layer (like ffurl_*). Signed-off-by: Martin Storsjö <martin@martin.st>
| * matroskaenc: Allow writing track "forced" flagJohn Stebbins2015-02-24
| | | | | | | | Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
* | avformat/flvenc: check that the codec_tag fits in the available bitsAndreas Cadhalpun2015-02-28
| | | | | | | | | | | | | | flags is later written with avio_w8 and if it doesn't fit in one byte it triggers an av_assert2. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: Add prefix to get_codec_guid()Michael Niedermayer2015-02-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | lavf/mov: correct printf specifierChristophe Gisquet2015-02-27
| | | | | | | | | | | | The type is int64_t. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | movenc: Write 'colr' box correctly for MP4Derek Buitenhuis2015-02-27
| | | | | | | | | | | | | | This also restricts it to MOV and MP4, since it is only defined for those formats. Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
* | avformat/ffmenc: Use ffio_free_dyn_buf()Michael Niedermayer2015-02-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/rtpdec_vp9: Use ffio_free_dyn_buf()Michael Niedermayer2015-02-27
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/bit: only accept the g729 codec and 1 channelAndreas Cadhalpun2015-02-26
| | | | | | | | | | | | | | Other codecs/channel numbers are not supported by this muxer. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/bit: check that pkt->size is 10 in write_packetAndreas Cadhalpun2015-02-26
| | | | | | | | | | | | | | | | | | Ohter packet sizes are not supported by this muxer. This avoids a null pointer dereference of pkt->data. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mp3dec: Check for avcodec_alloc_context3() failureMichael Niedermayer2015-02-26
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mp3dec: properly allocate dummy AVCodecContextMichael Niedermayer2015-02-26
| | | | | | | | | | | | | | Fixes (harmless) use of uninitialized variable Found-by: jamrial Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/adxdec: check avctx->channels for invalid valuesAndreas Cadhalpun2015-02-26
| | | | | | | | | | | | | | This avoids a null pointer dereference of pkt->data. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/adxdec: set avctx->channels in adx_read_headerAndreas Cadhalpun2015-02-26
| | | | | | | | | | | | | | It is used in adx_read_packet, which currently depends on the decoder/parser setting this value between reading the file header and demuxing the first packet. Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/dss: implement seekingMichael Niedermayer2015-02-26
| | | | | | | | | | | | | | This assumes CBR (which is true for all samples i have) Previous version reviewed by: Oleksij Rempel <linux@rempel-privat.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/dss: set bitrateMichael Niedermayer2015-02-26
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/dss: set packet durationMichael Niedermayer2015-02-26
| | | | | | | | | | | | Value taken from the decoder implementation Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/dss: correct sample rateMichael Niedermayer2015-02-26
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Allow muxing h264 into ts with startcode "001" instead of "0001".Carl Eugen Hoyos2015-02-25
| | | | | | | | | | Fixes ticket #2220. Fixes ticket #4324.
* | avformat/mov: Check ctts_count before useMichael Niedermayer2015-02-25
| | | | | | | | | | | | | | | | Fixes out of array read Fixes: asan_heap-oob_ae74b5_3610_cov_1739568095_test.3g2 Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd'Michael Niedermayer2015-02-25
|\| | | | | | | | | | | | | * commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd': rtpdec: Rename the free method to close Merged-by: Michael Niedermayer <michaelni@gmx.at>