Commit Graph

17159 Commits

Author SHA1 Message Date
Michael Niedermayer
78c59f3f0c Merge commit 'bde2bba45c2f2df27a8534028bda09a6e7f835e2'
* 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>
2015-03-01 01:31:26 +01:00
Michael Niedermayer
769b473a41 Merge commit 'd4c7fc02f9f59e721e76debf4a595df529707545'
* commit 'd4c7fc02f9f59e721e76debf4a595df529707545':
  rtpenc: Skip redundant initialization

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 01:24:27 +01:00
Michael Niedermayer
a2c4c30b5f Merge commit 'f8c01257f93ceda3e03bc4e540a51022d1e2bff2'
* commit 'f8c01257f93ceda3e03bc4e540a51022d1e2bff2':
  rtpenc: Always do the default initialization regardless of codecs

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 01:23:37 +01:00
Michael Niedermayer
9e09931fb6 Merge commit '11edeaea3293c41ecf577a330422eabba35f76a2'
* commit '11edeaea3293c41ecf577a330422eabba35f76a2':
  rtpenc_xiph: Don't exclude headers from max_payload_size

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 01:17:27 +01:00
Michael Niedermayer
7e53009588 Merge commit '7c1e2e64667421f931ab48141517f19d309c7eea'
* commit '7c1e2e64667421f931ab48141517f19d309c7eea':
  rtpenc_xiph: Use AV_WB16 instead of manual bitshifts

Conflicts:
	libavformat/rtpenc_xiph.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 01:17:10 +01:00
Michael Niedermayer
41b8d154aa Merge commit 'd16c8d28d4e2fca3af1054ffbf635c8cee755fc8'
* commit 'd16c8d28d4e2fca3af1054ffbf635c8cee755fc8':
  rtpenc_aac: Use AV_WB16 instead of manual bitshifts

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 01:08:07 +01:00
Michael Niedermayer
635403e078 Merge commit '9c9b0218e85fcd969308632f75af48a4ce229541'
* commit '9c9b0218e85fcd969308632f75af48a4ce229541':
  rtpenc_aac: Merge a definition with a declaration

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 01:07:46 +01:00
Michael Niedermayer
cfe33c98b7 Merge commit '1fc64e2e07787bbca82a72c146588e850e6d098a'
* commit '1fc64e2e07787bbca82a72c146588e850e6d098a':
  rtpenc: Write conditional statements on separate lines

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 01:01:01 +01:00
Michael Niedermayer
ba069e08bd Merge commit '0662440b991361fdb5e732712d997a73e4692e34'
* commit '0662440b991361fdb5e732712d997a73e4692e34':
  rtpenc_aac: Set a default value for max_frames_per_packet at init

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 01:00:44 +01:00
Michael Niedermayer
6f0a82966d Merge commit '12b3459979f5ea6481660cd2c99a0381e2b5ba37'
* commit '12b3459979f5ea6481660cd2c99a0381e2b5ba37':
  rtpenc_amr: Use s->num_frames instead of s->buf_ptr - s->buf

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 00:48:28 +01:00
Michael Niedermayer
f6f1e1a7a1 Merge commit '98563953442560dd83aab938f86de3e5a22a891f'
* commit '98563953442560dd83aab938f86de3e5a22a891f':
  rtpenc_aac: Fix sending fragmented frames

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-03-01 00:48:04 +01:00
Michael Niedermayer
ca6fee7606 Merge commit 'b9d2d6843a49f9df1d1ae1afe817d9b48c445919'
* commit 'b9d2d6843a49f9df1d1ae1afe817d9b48c445919':
  tls: Pass AVOptions dictionaries through to the chained protocol

Conflicts:
	libavformat/tls.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-28 23:32:33 +01:00
Michael Niedermayer
c5c4e5839a Merge commit 'e14f98c62fdf8744b07419314095d1b3248cce75'
* commit 'e14f98c62fdf8744b07419314095d1b3248cce75':
  tcp: Clarify the units for the timeout avoptions

Conflicts:
	libavformat/tcp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-28 23:20:39 +01:00
Michael Niedermayer
1fb3642317 Merge commit 'c86d8aed748adc3ba8df96fb1fe14aa45da77a31'
* commit 'c86d8aed748adc3ba8df96fb1fe14aa45da77a31':
  avio: Rename avclass symbols relating to avio

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-28 23:02:42 +01:00
Andreas Cadhalpun
e8565d21c2 avformat/flvenc: check that the codec_tag fits in the available bits
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>
2015-02-28 22:53:12 +01:00
Martin Storsjö
4f6cd883f0 rtpenc: Don't set max_frames_per_packet based on the packet frame size or 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>
2015-02-28 22:54:31 +02:00
Martin Storsjö
bde2bba45c rtpenc: Restructure if statements in packetizers to simplify adding more 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>
2015-02-28 22:54:26 +02:00
Martin Storsjö
d4c7fc02f9 rtpenc: Skip redundant initialization
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:54:22 +02:00
Martin Storsjö
f8c01257f9 rtpenc: Always do the default initialization regardless of codecs
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>
2015-02-28 22:54:11 +02:00
Martin Storsjö
11edeaea32 rtpenc_xiph: Don't exclude headers from max_payload_size
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>
2015-02-28 22:54:04 +02:00
Martin Storsjö
7c1e2e6466 rtpenc_xiph: Use AV_WB16 instead of manual bitshifts
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:54:00 +02:00
Martin Storsjö
d16c8d28d4 rtpenc_aac: Use AV_WB16 instead of manual bitshifts
This makes the code slightly more readable and understandable.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:53:57 +02:00
Martin Storsjö
9c9b0218e8 rtpenc_aac: Merge a definition with a declaration
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:53:54 +02:00
Martin Storsjö
1fc64e2e07 rtpenc: Write conditional statements on separate lines
Intentionally keeping some conditional statements on single lines
in rtpenc_h263.c.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:53:51 +02:00
Martin Storsjö
0662440b99 rtpenc_aac: Set a default value for max_frames_per_packet at init
This avoids having to conditionally set the default within the
packetizer function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:53:46 +02:00
Martin Storsjö
12b3459979 rtpenc_amr: Use s->num_frames instead of s->buf_ptr - s->buf
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>
2015-02-28 22:53:42 +02:00
Martin Storsjö
9856395344 rtpenc_aac: Fix sending fragmented frames
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>
2015-02-28 22:53:38 +02:00
Martin Storsjö
b9d2d6843a tls: Pass AVOptions dictionaries through to the chained protocol
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:08:19 +02:00
Martin Storsjö
e14f98c62f tcp: Clarify the units for the timeout avoptions
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-28 22:07:24 +02:00
Martin Storsjö
c86d8aed74 avio: Rename avclass symbols relating to avio
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>
2015-02-28 22:07:04 +02:00
Michael Niedermayer
0a23129bfc avformat: Add prefix to get_codec_guid()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-27 19:25:27 +01:00
Christophe Gisquet
60bdc868b9 lavf/mov: correct printf specifier
The type is int64_t.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-27 16:55:34 +01:00
Derek Buitenhuis
a22032281c movenc: Write 'colr' box correctly for MP4
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>
2015-02-27 14:06:02 +00:00
Michael Niedermayer
d490b26fcb avformat/ffmenc: Use ffio_free_dyn_buf()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-27 13:38:43 +01:00
Michael Niedermayer
629a03a912 avformat/rtpdec_vp9: Use ffio_free_dyn_buf()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-27 13:38:43 +01:00
Andreas Cadhalpun
d0b8640f75 avformat/bit: only accept the g729 codec and 1 channel
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>
2015-02-26 23:19:39 +01:00
Andreas Cadhalpun
eeda2c3de8 avformat/bit: check that pkt->size is 10 in write_packet
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>
2015-02-26 23:19:31 +01:00
Michael Niedermayer
b851bc20c6 avformat/mp3dec: Check for avcodec_alloc_context3() failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-26 20:11:19 +01:00
Michael Niedermayer
6ad42b3e15 avformat/mp3dec: properly allocate dummy AVCodecContext
Fixes (harmless) use of uninitialized variable

Found-by: jamrial
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-26 20:02:23 +01:00
Andreas Cadhalpun
7faa40af98 avformat/adxdec: check avctx->channels for invalid values
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>
2015-02-26 12:25:29 +01:00
Andreas Cadhalpun
64ea4a0598 avformat/adxdec: set avctx->channels in adx_read_header
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>
2015-02-26 12:25:29 +01:00
Michael Niedermayer
111d79aa88 avformat/dss: implement seeking
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>
2015-02-26 02:06:10 +01:00
Michael Niedermayer
626904b777 avformat/dss: set bitrate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-26 01:29:28 +01:00
Michael Niedermayer
5634ca6d37 avformat/dss: set packet duration
Value taken from the decoder implementation

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-26 01:03:12 +01:00
Michael Niedermayer
8064265a38 avformat/dss: correct sample rate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-26 00:54:10 +01:00
Carl Eugen Hoyos
56ffde3f61 Allow muxing h264 into ts with startcode "001" instead of "0001".
Fixes ticket #2220.
Fixes ticket #4324.
2015-02-25 15:08:33 +01:00
Michael Niedermayer
bbbc8c6188 avformat/mov: Check ctts_count before use
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>
2015-02-25 13:31:34 +01:00
Michael Niedermayer
3130e5be92 Merge commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd'
* commit 'd594dbecce5f3af7f80bbf5bb1b516d740b69ccd':
  rtpdec: Rename the free method to close

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:58:39 +01:00
Michael Niedermayer
7f03f75ce7 Merge commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a'
* commit '8e32b1f0963d01d4f5d4803eb721f162e0d58d9a':
  libavformat: Use ffio_free_dyn_buf where applicable

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:48:50 +01:00
Michael Niedermayer
7d9b06eb17 Merge commit '199fb40278146c5bb162990c66ad3cd561abc780'
* commit '199fb40278146c5bb162990c66ad3cd561abc780':
  rtpdec: Use ffio_free_dyn_buf

Conflicts:
	libavformat/rtpdec_latm.c
	libavformat/rtpdec_svq3.c
	libavformat/rtpdec_xiph.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:42:14 +01:00
Michael Niedermayer
6e9bbaca6c Merge commit '8a273a746061a112e5e35066a8fd8e146d821a62'
* commit '8a273a746061a112e5e35066a8fd8e146d821a62':
  avio: Add an internal utility function for freeing dynamic buffers

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:33:09 +01:00
Michael Niedermayer
79052cd4ce Merge commit '078d43e23a7a3d64aafee8a58b380d3e139b3020'
* commit '078d43e23a7a3d64aafee8a58b380d3e139b3020':
  rtpdec: Free depacketizers if the init function failed

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:32:06 +01:00
Michael Niedermayer
fa80b76b11 Merge commit 'bb4a310bb85f43e62240145a656b1e5285b14239'
* commit 'bb4a310bb85f43e62240145a656b1e5285b14239':
  rtpdec: Don't free the payload context in the .free function

Conflicts:
	libavformat/rtpdec_latm.c
	libavformat/rtpdec_mpeg4.c
	libavformat/rtpdec_mpegts.c
	libavformat/rtpdec_xiph.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:25:12 +01:00
Michael Niedermayer
64f58d20b2 Merge commit 'f4b59334bd898c47c9ac30999a346176548630a8'
* commit 'f4b59334bd898c47c9ac30999a346176548630a8':
  rtpdec: Remove the now unused .alloc field

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:17:48 +01:00
Michael Niedermayer
f966ac2b6e avformat/rtpdec_vp9: remove alloc/free functions
Simplify code

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:17:38 +01:00
Michael Niedermayer
d52bf89d21 Merge commit '78791c086bcaf9eb084c27555b31fea8bbb7624a'
* commit '78791c086bcaf9eb084c27555b31fea8bbb7624a':
  rtpdec: Use .init instead of .alloc to set default values

Conflicts:
	libavformat/rdt.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-25 00:03:52 +01:00
Michael Niedermayer
99c76902cd Merge commit '88434f9725e7c9484dcbcf323566ae88a2904f32'
* commit '88434f9725e7c9484dcbcf323566ae88a2904f32':
  rtpdec: Remove unnecessary inline attributes

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 23:44:45 +01:00
Michael Niedermayer
d2a5c6f210 Merge commit 'ec96a89c3e507cf0fb1f2b159b28a53f2bad9a74'
* commit 'ec96a89c3e507cf0fb1f2b159b28a53f2bad9a74':
  rtpdec: Don't pass non-const pointers to fmtp attribute parsing functions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 23:44:25 +01:00
Michael Niedermayer
499da717b8 Merge commit 'ac0e54fda9305cc7d149007f5b512bb8619f7c78'
* commit 'ac0e54fda9305cc7d149007f5b512bb8619f7c78':
  rtpdec: Add const to string parameters in internal fmtp parsing functions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 23:38:19 +01:00
Michael Niedermayer
1c5d9dd2b7 Merge commit '12251f997bbc0abb93be39c51021e6d404ca385f'
* commit '12251f997bbc0abb93be39c51021e6d404ca385f':
  rtpdec: Remove unnecessary checks

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 23:37:54 +01:00
Michael Niedermayer
cf95877474 Merge commit 'c82bf15dca00f67a701d126e47ea9075fc9459cb'
* commit 'c82bf15dca00f67a701d126e47ea9075fc9459cb':
  rtpenc: Merge the h264 and hevc packetizers

Conflicts:
	libavformat/rtpenc_hevc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 23:30:51 +01:00
Michael Niedermayer
17773f49b7 Merge commit '3567b91e49c6ae101c9a35c90f46b8ad9890ac15'
* commit '3567b91e49c6ae101c9a35c90f46b8ad9890ac15':
  rtpdec_hevc: Share the implementation of fragmented packets with h264

Conflicts:
	libavformat/rtpdec_h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 23:23:26 +01:00
Michael Niedermayer
0f8de2b5f1 Merge commit 'f3449062a8d100ac4f703647336c32b126aa99f1'
* commit 'f3449062a8d100ac4f703647336c32b126aa99f1':
  rtpdec_hevc: Reduce indentation level by returning early on errors

Conflicts:
	libavformat/rtpdec_hevc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 23:16:46 +01:00
Michael Niedermayer
29f9d82d23 Merge commit '8633fb47db2ec39eb8bd1bd65302af75a94ff5d0'
* commit '8633fb47db2ec39eb8bd1bd65302af75a94ff5d0':
  rtpdec_hevc: Share the implementation of parsing a=framesize with h264

Conflicts:
	libavformat/rtpdec_h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 23:03:12 +01:00
Michael Niedermayer
df38883607 Merge commit '5956f489d0452ff6dea6b6b81b4fa8e596fc5684'
* commit '5956f489d0452ff6dea6b6b81b4fa8e596fc5684':
  rtpdec_hevc: Add asterisks at the start of each long comment line

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:55:55 +01:00
Michael Niedermayer
3804d73e46 Merge commit '5d8cae45737bed6239bd6b6e0698802dbe1463c8'
* commit '5d8cae45737bed6239bd6b6e0698802dbe1463c8':
  rtpdec: Get rid of all trivial .alloc/.free functions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:55:20 +01:00
Michael Niedermayer
48e3cd4fcd Merge commit 'e72605f80bf5cbe32053a554ccc137e0a99cf3dd'
* commit 'e72605f80bf5cbe32053a554ccc137e0a99cf3dd':
  rtpdec: Allow allocating and freeing the private data without explicit functions

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:42:04 +01:00
Michael Niedermayer
11fb625858 Merge commit '2b982e92f42a6e661d90b12b6592cd13cae496d4'
* commit '2b982e92f42a6e661d90b12b6592cd13cae496d4':
  rtpdec: Set need_parsing via a handler field

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:34:08 +01:00
Michael Niedermayer
4c8a556a77 Merge commit 'b7a4c319fda22aa91ce29692d728ec6103b514f6'
* commit 'b7a4c319fda22aa91ce29692d728ec6103b514f6':
  rtpdec: Allow setting the need_parsing field in RTPDynamicProtocolHandler

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:33:49 +01:00
John Stebbins
da7e561964 matroskaenc: Allow writing track "forced" flag
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2015-02-24 22:28:51 +01:00
Michael Niedermayer
2bedcbf822 Merge commit 'b651c9139e1ab222d5aab9151dcd7d6e40e49885'
* commit 'b651c9139e1ab222d5aab9151dcd7d6e40e49885':
  rtpdec_mpa_robust: Move .enc_name to the start of the struct

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:26:42 +01:00
Michael Niedermayer
a51b192f3b Merge commit 'db158f0dd217cf839be8af195d66cf49a76537a8'
* commit 'db158f0dd217cf839be8af195d66cf49a76537a8':
  rtpdec: Remove unnecessary _if_needed suffixes on functions

Conflicts:
	libavformat/rtpdec_xiph.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:26:15 +01:00
Michael Niedermayer
8c6651a14d Merge commit '353b492d0f2a21ae8eb829db1ac01b54b2a4d202'
* commit '353b492d0f2a21ae8eb829db1ac01b54b2a4d202':
  rtpdec: Change enc_name to a pointer instead of a fixed-size buffer

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:19:33 +01:00
Michael Niedermayer
a4f50ec9dd Merge commit '0752f700d63f6b15ffd5369ac7615414cce71247'
* commit '0752f700d63f6b15ffd5369ac7615414cce71247':
  rtpdec_h264: Remove an unnecessary include

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:19:06 +01:00
Michael Niedermayer
ae2a8d8742 Merge commit '247764a592f83521f9c1ccdc900b00a8b84f3c87'
* commit '247764a592f83521f9c1ccdc900b00a8b84f3c87':
  rtpdec_h264: Remove unnecessary struct padding

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:12:16 +01:00
Michael Niedermayer
5d06b6e984 Merge commit 'fe414059ec1fe8237574bed34cdaa8ac3893917b'
* commit 'fe414059ec1fe8237574bed34cdaa8ac3893917b':
  rtpdec_amr: Use the common indentation style

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:11:58 +01:00
Martin Storsjö
d594dbecce rtpdec: Rename the free method to close
Many of these functions were named foo_free_context, and since
the functions no longer should free the context itself, only
allocated elements within it, the previous naming was slightly
misleading.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:50 +02:00
Martin Storsjö
8e32b1f096 libavformat: Use ffio_free_dyn_buf where applicable
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:47 +02:00
Martin Storsjö
199fb40278 rtpdec: Use ffio_free_dyn_buf
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:44 +02:00
Martin Storsjö
8a273a7460 avio: Add an internal utility function for freeing dynamic buffers
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:41 +02:00
Martin Storsjö
078d43e23a rtpdec: Free depacketizers if the init function failed
This is different from how it is handled in codecs/demuxers/muxers
though (where the close function isn't called if the open function
failed), but since the number of depacketizers that have an .init
function is quite limited, this is easy to change.

The main point is that if the init function failed, we shouldn't
try to use that depacketizer at all - this makes sure that the
parse function doesn't need to check for the things that were
initialized in the init function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:39 +02:00
Martin Storsjö
bb4a310bb8 rtpdec: Don't free the payload context in the .free function
This makes it more consistent with depacketizers that don't have any
.free function at all, where the payload context is freed by the
surrounding framework. Always free the context in the surrounding
framework, having the individual depacketizers only free any data
they've specifically allocated themselves.

This is similar to how this works for demuxer/muxers/codecs - a
component shouldn't free the priv_data that the framework has
allocated for it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:35 +02:00
Martin Storsjö
f4b59334bd rtpdec: Remove the now unused .alloc field
Always use the .priv_data_size field instead.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:32 +02:00
Martin Storsjö
78791c086b rtpdec: Use .init instead of .alloc to set default values
The ugly error handling in rdt gets improved in a later commit.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:28 +02:00
Martin Storsjö
88434f9725 rtpdec: Remove unnecessary inline attributes
These functions are far from performance critical, so there's no
point in marking them as inline.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:25 +02:00
Martin Storsjö
ec96a89c3e rtpdec: Don't pass non-const pointers to fmtp attribute parsing functions
This makes it clear that the individual parsing functions can't
touch the parsed out value.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:22 +02:00
Martin Storsjö
ac0e54fda9 rtpdec: Add const to string parameters in internal fmtp parsing functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:18 +02:00
Martin Storsjö
12251f997b rtpdec: Remove unnecessary checks
The free function of a depacketizer won't be called if data is NULL.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 23:07:14 +02:00
Michael Niedermayer
eb24186b45 Merge commit '74d318f138f2a3f1b2fe81aea826d80d1e60f54c'
* commit '74d318f138f2a3f1b2fe81aea826d80d1e60f54c':
  rtsp: Fix the indentation of a linewrapped statement

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:03:57 +01:00
Michael Niedermayer
30c863fdfa Merge commit '3cd5828fc0007e6d056067444de053a34ddedd02'
* commit '3cd5828fc0007e6d056067444de053a34ddedd02':
  rtpdec: Add missing trailing commas

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 22:03:19 +01:00
Michael Niedermayer
8c1c069371 Merge commit '04a1be8e28e81f3967eace7705343c450616cc95'
* commit '04a1be8e28e81f3967eace7705343c450616cc95':
  libavformat: add T.140 RTP depacketization (RFC 4103)

Conflicts:
	libavformat/rtpdec.c
	libavformat/version.h

See: af940e6cb1
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 21:55:46 +01:00
Michael Niedermayer
c6792275f4 Merge commit '26524e358147aade6e9dd18fff42d61b966bbc70'
* commit '26524e358147aade6e9dd18fff42d61b966bbc70':
  rtsp: Interpret the text media type as AVMEDIA_TYPE_DATA

See: afb0e5a810
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 21:43:13 +01:00
Kevin Wheatley
3664703780 avformat/movenc: Fix writing ACLR atoms for DNxHD
Using the copy codec ACLR atoms where incorrectly written

During the creation of the ACLR atom we are assuming the vos_data
contains the DNxHD header. This change makes this explicit and
ensures we don't over write the stream with the extra_data.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 16:54:02 +01:00
Michael Niedermayer
847daac5c0 avformat/dss: Set packet position correctly
pos previously was set but then overwritten

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-24 15:41:02 +01:00
Martin Storsjö
c82bf15dca rtpenc: Merge the h264 and hevc packetizers
They share a great deal of common structure; only a few minor
bits in the headers differ.

This also fixes an off-by-one in sending of the last fragment
of large HEVC nals (where it previously sent len+2 bytes, even
if it should have been len+RTP_HEVC_HEADERS_SIZE aka len+3).

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:25:43 +02:00
Martin Storsjö
3567b91e49 rtpdec_hevc: Share the implementation of fragmented packets with h264
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:25:28 +02:00
Martin Storsjö
f3449062a8 rtpdec_hevc: Reduce indentation level by returning early on errors
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:25:21 +02:00
Martin Storsjö
8633fb47db rtpdec_hevc: Share the implementation of parsing a=framesize with h264
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:24:36 +02:00
Martin Storsjö
5956f489d0 rtpdec_hevc: Add asterisks at the start of each long comment line
This is the common style for such comments.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:24:27 +02:00
Martin Storsjö
5d8cae4573 rtpdec: Get rid of all trivial .alloc/.free functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:24:19 +02:00
Martin Storsjö
e72605f80b rtpdec: Allow allocating and freeing the private data without explicit functions
This can reduce the amount of boilerplate in simple depacketizers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:23:37 +02:00
Martin Storsjö
2b982e92f4 rtpdec: Set need_parsing via a handler field
This avoids implementing a full function just to set this one
field.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:22:41 +02:00
Martin Storsjö
b7a4c319fd rtpdec: Allow setting the need_parsing field in RTPDynamicProtocolHandler
This allows getting rid of quite a bit of boilerplate in depacketizers.

The default value (initializing need_parsing to 0, aka
AVSTREAM_PARSE_NONE) is the same as it is initialized to by default
in AVStream.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:22:21 +02:00
Martin Storsjö
b651c9139e rtpdec_mpa_robust: Move .enc_name to the start of the struct
This makes it match the other depacketizers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:22:04 +02:00
Martin Storsjö
db158f0dd2 rtpdec: Remove unnecessary _if_needed suffixes on functions
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:21:54 +02:00
Martin Storsjö
353b492d0f rtpdec: Change enc_name to a pointer instead of a fixed-size buffer
This avoids allocating space for a too large buffer for all the
name strings.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:21:18 +02:00
Martin Storsjö
0752f700d6 rtpdec_h264: Remove an unnecessary include
Nothing in this file use any network functions.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:20:54 +02:00
Martin Storsjö
247764a592 rtpdec_h264: Remove unnecessary struct padding
There's no point in adding padding in the allocation of a depacketizer
specific context struct.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:20:44 +02:00
Martin Storsjö
fe414059ec rtpdec_amr: Use the common indentation style
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:20:23 +02:00
Martin Storsjö
74d318f138 rtsp: Fix the indentation of a linewrapped statement
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:20:10 +02:00
Martin Storsjö
3cd5828fc0 rtpdec: Add missing trailing commas
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:20:02 +02:00
Gilles Chanteperdrix
04a1be8e28 libavformat: add T.140 RTP depacketization (RFC 4103)
Map this to AV_CODEC_ID_TEXT.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:19:44 +02:00
Martin Storsjö
26524e3581 rtsp: Interpret the text media type as AVMEDIA_TYPE_DATA
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-24 16:19:37 +02:00
Clément Bœsch
cc69ccb6d4 avformat/nutdec: fix isom and mpa build deps
Fixes the following link error:
  nutdec.c:(.text+0x2d47): undefined reference to `ff_codec_movvideo_tags'
  isom.c:(.text+0x332): undefined reference to `avpriv_mpeg4audio_get_config'
  isom.c:(.text+0x39e): undefined reference to `avpriv_mpa_freq_tab'
2015-02-24 11:22:47 +01:00
Michael Niedermayer
4d1b017c38 avformat/mov: Check av_add_index_entry() return value
Fixes NULL pointer dereference
Fixes: signal_sigsegv_b060e0_3794_cov_1293954059_vc1-wmapro.ism

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-23 22:48:35 +01:00
Michael Niedermayer
83f18410bd Merge commit 'cdcc370293a159c321e41af7f0eef141c62d698d'
* commit 'cdcc370293a159c321e41af7f0eef141c62d698d':
  rtsp: punch holes again after pause

See: 22bb5bd7a3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-23 21:43:18 +01:00
Michael Niedermayer
596f81c75b Merge commit 'fe208ca54b0d3b6bbe1c660d371bb2cc6cf40ffc'
* commit 'fe208ca54b0d3b6bbe1c660d371bb2cc6cf40ffc':
  rtpdec_hevc: Skip 1 byte (DOND) instead of 2 (DONL) between aggregation units

Conflicts:
	libavformat/rtpdec_hevc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-23 21:01:44 +01:00
Michael Niedermayer
6c9537b807 avformat/hlsenc: Warn if a non file protocol is used
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-23 16:53:36 +01:00
Gilles Chanteperdrix
cdcc370293 rtsp: punch holes again after pause
When a client behind a NAT issues a pause command, and stay paused for a
long time, the router may stop the RTP/RTCP port redirection. Resend the
hole punching packets before each PLAY command to cause the router to
restart the port redirection in that case.

Move the existing code for sending the packets from the SETUP phase
to the PLAY phase.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-23 16:55:56 +02:00
Martin Storsjö
fe208ca54b rtpdec_hevc: Skip 1 byte (DOND) instead of 2 (DONL) between aggregation units
Only the first aggregation unit has 2 bytes (DONL) prepended, if
such a field is in use.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-23 15:33:20 +02:00
Michael Niedermayer
2cf521718d Merge commit '35c6ce76b107225a19eb33aea38857d2405882af'
* commit '35c6ce76b107225a19eb33aea38857d2405882af':
  Canopus HQX decoder

Conflicts:
	Changelog
	libavcodec/avcodec.h
	libavcodec/version.h
	tests/fate/video.mak

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-23 12:19:26 +01:00
Michael Niedermayer
fab8b88a5e Merge commit 'a388e72d1a6b0888cc1591cb699f61a9c1089cf4'
* commit 'a388e72d1a6b0888cc1591cb699f61a9c1089cf4':
  rtpenc_hevc: Aggregate multiple NAL units into one RTP packet, if possible

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-23 00:29:50 +01:00
Michael Niedermayer
17c52d746c Merge commit 'e2220e734f3d01145ef9aefbd7b6ff29a89ae159'
* commit 'e2220e734f3d01145ef9aefbd7b6ff29a89ae159':
  rtpenc_h264: Aggregate multiple NAL units into one RTP packet, if possible

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-23 00:13:23 +01:00
Michael Niedermayer
db4a2976f6 Merge commit 'c99915f7c74ce1249d8633cb6fd09035b8d84db7'
* commit 'c99915f7c74ce1249d8633cb6fd09035b8d84db7':
  rtpdec: DV depacketizer (RFC 6469)

Conflicts:
	Changelog
	libavformat/Makefile
	libavformat/rtpdec_dv.c
	libavformat/version.h

See: cbe508553a
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 23:54:34 +01:00
Vittorio Giovara
35c6ce76b1 Canopus HQX decoder
Based on work by Kostya Shishkov <kostya.shishkov@gmail.com>.
2015-02-22 22:42:27 +00:00
Martin Storsjö
a388e72d1a rtpenc_hevc: Aggregate multiple NAL units into one RTP packet, if possible
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-22 23:27:03 +02:00
Martin Storsjö
e2220e734f rtpenc_h264: Aggregate multiple NAL units into one RTP packet, if possible
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-22 23:26:57 +02:00
Thomas Volkert
c99915f7c7 rtpdec: DV depacketizer (RFC 6469)
(tested with live555 RTSP server)

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-22 23:01:55 +02:00
Michael Niedermayer
3518925a91 avformat/movenc: Check for memory allocation failures
Fixes CID1271049
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 20:20:13 +01:00
Michael Niedermayer
40adcf576f avformat/oggdec: Check for ost allocation failure
Fixes CID1257798
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 19:21:53 +01:00
Michael Niedermayer
9b8152bf04 avformat/oggdec: Check for av_malloc() failure and forward the error code
Fixes CID1257805

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 17:53:35 +01:00
Michael Niedermayer
5683810302 avformat/rmenc: Check for av_malloc() failure
Fixes CID1257832

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 17:47:40 +01:00
Gilles Chanteperdrix
22bb5bd7a3 avformat/rtsp: punch holes again after pause
When a client behind a NAT issues a pause command, and stay paused for a
long time, the router may stop the RTP/RTCP port redirection. Resend the
hole punching packets after each PLAY command to cause the router to
restart the port redirection in that case.

Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 14:09:26 +01:00
Michael Niedermayer
20f5a17956 Merge commit '44dc138ed29c4dfbaf57ebc774da4c75ef113ca4'
* commit '44dc138ed29c4dfbaf57ebc774da4c75ef113ca4':
  rtpdec_mpeg4: reassemble fragmented AAC frames

Conflicts:
	libavformat/rtpdec_mpeg4.c

See: fee2cc39be
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 01:59:44 +01:00
Michael Niedermayer
1186e7cf95 Merge commit '96084251e57d1738fde02a2b0d37ca609d9efd71'
* commit '96084251e57d1738fde02a2b0d37ca609d9efd71':
  libavformat: add robust MPEG audio depacketization (RFC 5219)

Conflicts:
	Changelog
	libavformat/version.h

See: 22470510d1
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 01:30:17 +01:00
Gilles Chanteperdrix
fee2cc39be avformat/rtpdec_mpeg4: reassemble fragmented AAC frames
Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Reviewed-by: Thomas Volkert <silvo@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 00:56:18 +01:00
Michael Niedermayer
17384b1719 Merge commit '5e5583efe41662294c5e1b76499ba338557f808d'
* commit '5e5583efe41662294c5e1b76499ba338557f808d':
  libavformat: add AC3 RTP depacketization (RFC 4184)

Conflicts:
	Changelog
	libavformat/rtpdec_ac3.c
	libavformat/version.h

See: 3eec775b21
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 00:48:27 +01:00
Michael Niedermayer
285eea0001 Merge commit '4438d1c6ede3190d7920513272fb9dc5371648f2'
* commit '4438d1c6ede3190d7920513272fb9dc5371648f2':
  rtsp: parse lang attribute in SDP

Conflicts:
	libavformat/rtsp.h
	libavformat/version.h

See: c7ad1f562b
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 00:36:53 +01:00
Michael Niedermayer
b0b7571a52 Merge commit 'ff394ca087d41941d2157e7a4e356e3ad312494e'
* commit 'ff394ca087d41941d2157e7a4e356e3ad312494e':
  rtpdec_h264: Add a missing closing paren in a log message

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-22 00:15:10 +01:00
Gilles Chanteperdrix
44dc138ed2 rtpdec_mpeg4: reassemble fragmented AAC frames
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 23:38:07 +02:00
Gilles Chanteperdrix
dcf969e98d rtpdec_mpeg4: add more verbose error logging
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 23:37:58 +02:00
Gilles Chanteperdrix
96084251e5 libavformat: add robust MPEG audio depacketization (RFC 5219)
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 23:37:50 +02:00
Gilles Chanteperdrix
5e5583efe4 libavformat: add AC3 RTP depacketization (RFC 4184)
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 23:37:32 +02:00
Gilles Chanteperdrix
4438d1c6ed rtsp: parse lang attribute in SDP
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 23:37:24 +02:00
Gilles Chanteperdrix
1ec28a66f2 rtpdec: fix issue with conversion from unsigned to signed
When receiving an RTCP packet, the difference between the last RTCP
timestamp and the base timestamp may be negative. As these timestamps
are of the uint32_t type, the result becomes a large integer. Cast
the difference to int32_t to avoid this issue.

The result of this issue is very large start times for RTSP
streams, and difficulty to restart correctly after a pause.

Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 23:37:15 +02:00
Martin Storsjö
ff394ca087 rtpdec_h264: Add a missing closing paren in a log message
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 23:36:56 +02:00
Thomas Volkert
7a459be8e7 avformat/rtpdec_dv: fix bundled audio typo
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21 22:36:18 +01:00
Michael Niedermayer
2af5fb2f8c avformat/flacenc: Use av_clip_uintp2()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21 14:43:28 +01:00
Gilles Chanteperdrix
73029abddc libavformat/rtpdec: fix issue with conversion from unsigned to signed
When receiving an RTCP packet, the difference between the last RTCP
timestamp and the base timestamp may be negative. As these timestamps
are of the uint32_t type, the result becomes a large integer. Cast
the difference to int32_t to avoid this issue.

The result of this issue is very large start times for RTSP
streams, and difficulty to restart correctly after a pause.

Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21 14:18:52 +01:00
Michael Niedermayer
e3cc93aacf Merge commit 'cbdd1806ead8758949f22b4e4f214b035c78e2b9'
* commit 'cbdd1806ead8758949f22b4e4f214b035c78e2b9':
  rtpdec_hevc: Implement parsing of aggregated packets

Conflicts:
	libavformat/rtpdec_hevc.c

See: b6f577dbb2
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21 13:22:02 +01:00
Michael Niedermayer
2b2b6d1e3c Merge commit 'b878ba03e7e088777cc5083766e0b2a293e716ee'
* commit 'b878ba03e7e088777cc5083766e0b2a293e716ee':
  rtpdec_hevc: Initialize variables to silence false positive compiler warnings

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21 13:09:24 +01:00
Michael Niedermayer
5402a22845 Merge commit '10e2d8b5562d8729e4eefbcec63a11eb8a0c502c'
* commit '10e2d8b5562d8729e4eefbcec63a11eb8a0c502c':
  rtpdec_hevc: Use a shared function for parsing parameter sets

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21 13:02:42 +01:00
Michael Niedermayer
a10529a319 Merge commit '0de07510844517b615ef2a2e2916f6391ad88687'
* commit '0de07510844517b615ef2a2e2916f6391ad88687':
  rtpdec_h264: Make reusable functions non-static

Conflicts:
	libavformat/rtpdec_formats.h
	libavformat/rtpdec_h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21 12:56:08 +01:00
Michael Niedermayer
7fd732b758 Merge commit '16163e6bf2d446c06d4dd053c0852074bb50508d'
* commit '16163e6bf2d446c06d4dd053c0852074bb50508d':
  rtpdec_h264: Fix nal type counting after refactoring

Conflicts:
	libavformat/rtpdec_h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21 12:44:09 +01:00
Michael Niedermayer
34c58618be Merge commit 'a3cc519d1f43bf93cc29fd53284a2b8aa6189a9a'
* commit 'a3cc519d1f43bf93cc29fd53284a2b8aa6189a9a':
  rtpdec_h264: Prepare h264_handle_packet_stap_a for sharing with hevc

Conflicts:
	libavformat/rtpdec_h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21 12:32:28 +01:00
Michael Niedermayer
621450e786 Merge commit '48183b3ad45c95e386a4cb02e1a68b53e6835ac5'
* commit '48183b3ad45c95e386a4cb02e1a68b53e6835ac5':
  rtpdec_h264: Generalize parse_sprop_parameter_sets

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21 12:25:09 +01:00
Thomas Volkert
cbdd1806ea rtpdec_hevc: Implement parsing of aggregated packets
With significant changes by Martin Storsjö, to use the shared
function instead of reimplementing it.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 11:32:50 +02:00
Martin Storsjö
b878ba03e7 rtpdec_hevc: Initialize variables to silence false positive compiler warnings
For some reason, clang didn't warn about this prior to using the
shared function.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 11:32:47 +02:00
Martin Storsjö
10e2d8b556 rtpdec_hevc: Use a shared function for parsing parameter sets
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 11:32:44 +02:00
Martin Storsjö
0de0751084 rtpdec_h264: Make reusable functions non-static
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 11:32:41 +02:00
Martin Storsjö
16163e6bf2 rtpdec_h264: Fix nal type counting after refactoring
This fixes builds with -DDEBUG after f0a874799.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 11:32:38 +02:00
Martin Storsjö
a3cc519d1f rtpdec_h264: Prepare h264_handle_packet_stap_a for sharing with hevc
Add a parameter for skipping a number of bytes at the start of each nal.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 11:32:36 +02:00
Martin Storsjö
48183b3ad4 rtpdec_h264: Generalize parse_sprop_parameter_sets
Don't write directly into an AVCodecContext, write into given
pointers.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-21 11:32:31 +02:00
Michael Niedermayer
e78a729163 avformat/hlsenc: Use ff_rename() only for local files
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21 01:50:26 +01:00
Hendrik Leppkes
da97e4c64a hlsenc: write playlist into a temp file and replace the original atomically
Reviewed-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-21 01:50:06 +01:00
Lukasz Marek
e19d1840da lavf/ffmenc: do not fail on missing codec
ffm encoder fails when codec is not found.
It may happen when stream is being copied.
This commit allows to store such stream and provides
backward compatibility with version prior 2.5 release.

fixes #4266

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
2015-02-21 00:23:37 +01:00
Hendrik Leppkes
3fe26bb608 hlsenc: write playlist into a temp file and replace the original atomically
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-20 23:55:28 +02:00
Hendrik Leppkes
ff48ae94f9 hlsenc: remove the AVIOContext for the playlist from the muxer context
Its only used in one function, having it in the context serves no purpose.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-20 23:55:27 +02:00
Michael Niedermayer
dc6eadaa45 Merge commit '46ad9ac9641d1fe8292ec1f46bbd2e4456621ca7'
* commit '46ad9ac9641d1fe8292ec1f46bbd2e4456621ca7':
  rtpdec_h264: Move a leftover comment into h264_handle_packet_stap_a

Conflicts:
	libavformat/rtpdec_h264.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 22:03:54 +01:00
Michael Niedermayer
d19ca4b2ea Merge commit 'a335ed767161c6da2815371177cfd5e40f78e5b7'
* commit 'a335ed767161c6da2815371177cfd5e40f78e5b7':
  rtpdec_h264: Remove an unnecessary check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 21:57:34 +01:00
Michael Niedermayer
ac7128a90f Merge commit '176903ce833ce7469f411640e9748a0d549b5285'
* commit '176903ce833ce7469f411640e9748a0d549b5285':
  rtpdec_h264: Return immediately on errors in h264_handle_packet_stap_a

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 21:48:32 +01:00
Michael Niedermayer
48e661b30b Merge commit 'bb8c6ac840afa69dd37860fdf85da9f4cf1e0ae4'
* commit 'bb8c6ac840afa69dd37860fdf85da9f4cf1e0ae4':
  rtpdec_h264: Make a parameter pointer const

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 21:40:17 +01:00
Michael Niedermayer
5346b57ee7 Merge commit '7650caf013f45ebebf128855735a0c6350836ea4'
* commit '7650caf013f45ebebf128855735a0c6350836ea4':
  rtpdec_h264: Use av_realloc instead of av_malloc+mempcy

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 21:30:14 +01:00
Michael Niedermayer
2130ed3312 Merge commit '8bdbf49c6f4d9473183a3c45ec70d611eb6183cd'
* commit '8bdbf49c6f4d9473183a3c45ec70d611eb6183cd':
  rtpdec_h264: Include the right header for AV_RB16

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 21:23:16 +01:00
Michael Niedermayer
de4ae9fb64 Merge commit 'ba2e07909b848e583245856a59d0fe1dd08f917e'
* commit 'ba2e07909b848e583245856a59d0fe1dd08f917e':
  rtpdec_vp8: Set the keyframe flag

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 21:15:28 +01:00
Michael Niedermayer
0f55bc29d4 avformat/omadec: Use 64bit for ret to avoid overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 21:01:54 +01:00
Michael Niedermayer
cb08687180 avformat/vqf: Use 64bit for ret to avoid overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 21:00:57 +01:00
Michael Niedermayer
d44e0d8b93 avformat/wtvdec: Use 64bit for ret to avoid overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 20:57:31 +01:00
Michael Niedermayer
26c0cc154e avformat/mvdec: Use 64bit for ret to avoid overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 20:41:35 +01:00
Michael Niedermayer
80a851aa5e avformat/apngdec: Use 64bit for ret to avoid overflow
Missed this hunk in first commit

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 20:39:04 +01:00
Michael Niedermayer
12987f8900 avformat/gxf: Use 64bit for res to avoid overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 20:14:56 +01:00
Michael Niedermayer
d1923d15a3 avformat/idcin: Use 64bit for ret to avoid overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 20:13:06 +01:00
Michael Niedermayer
0e3d6e17de avformat/apngdec: Use 64bit ret to avoid overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 19:31:10 +01:00
Michael Niedermayer
d4936d28a1 avformat/asfdec: Use 64bit ret to avoid overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 19:30:09 +01:00
Rodger Combs
62e95757d5 wtvdec: fix integer overflow resulting in errors with large files
This fixes a regression in 9fbc613f0d

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 18:38:36 +01:00
Martin Storsjö
46ad9ac964 rtpdec_h264: Move a leftover comment into h264_handle_packet_stap_a
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-20 19:30:05 +02:00
Martin Storsjö
a335ed7671 rtpdec_h264: Remove an unnecessary check
If src_len is too small for nal_size, we already print a warning
above, and the next step is to check the while loop condition
anyway, so this one serves no purpose.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-20 19:29:58 +02:00
Martin Storsjö
176903ce83 rtpdec_h264: Return immediately on errors in h264_handle_packet_stap_a
Previously, errors were only logged but the code kept on trying,
and never actually returning the error as a return value.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-20 19:29:39 +02:00
Martin Storsjö
bb8c6ac840 rtpdec_h264: Make a parameter pointer const
Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-20 19:29:34 +02:00
Martin Storsjö
7650caf013 rtpdec_h264: Use av_realloc instead of av_malloc+mempcy
This is similar to what was done for rtpdec_hevc in ced7238cd0.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-20 19:29:29 +02:00
Martin Storsjö
8bdbf49c6f rtpdec_h264: Include the right header for AV_RB16
Including libavcodec/get_bits.h is superfluous for AV_RB16 - nothing
in this file uses any actual bitstream reader.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-20 19:28:44 +02:00
Martin Storsjö
ba2e07909b rtpdec_vp8: Set the keyframe flag
This allows the output to be used with stream copy, which discards
packet from the start until the first keyframe.

Signed-off-by: Martin Storsjö <martin@martin.st>
2015-02-20 19:28:28 +02:00
Hendrik Leppkes
28bf05e7b5 hlsenc: remove the AVIOContext for the playlist from the muxer context
Its only used in one function, having it in the context serves no purpose.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 13:13:19 +01:00
Kevin Wheatley
31c7c0e156 avformat/movenc: Move avid DNxHD padding to the correct spot
Outputting DNxHD into .mov containers 'corrupts' following atoms until end of stsd

ffmpeg and qtdump could not decode pasp/colr atoms in the files made by ffmpeg,
when outputting DNxHD due to the incorrect padding placement. Now we add the
padding in the correct place

Tidy up FATE changes due to padding changes.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-20 12:17:14 +01:00
Michael Niedermayer
be0cb7e053 avformat/dss: Use av_freep() to avoid leaving stale pointers in memory
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-19 22:15:22 +01:00
Michael Niedermayer
b2bbe8298b avformat/dss: Check sscanf() return value in dss_read_metadata_date()
Fixes writing uninitialized values into metadata without error in case
parsing fails

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-19 22:10:47 +01:00
Michael Niedermayer
e821910a21 Merge commit '062cd5a975ff7bd6fb91f9b4d1d9d102a7545499'
* commit '062cd5a975ff7bd6fb91f9b4d1d9d102a7545499':
  lavf: Add DSS demuxer

Conflicts:
	libavformat/Makefile
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-19 21:44:58 +01:00
Oleksij Rempel
062cd5a975 lavf: Add DSS demuxer
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
2015-02-19 12:05:19 -05:00
Kevin Wheatley
fb3fb1d0d4 avformat/mov: Add simple ACLR atom reading to set the color range of the incomming track for codec's like DNxHD that utilise AVID's proprietary atom.
On input ACLR will be used to set colour range no matter which codec
it is associated with.
No change for when it will be output.

Rework mov_read_extradata function to allow detection of truncated
atom reads by callers.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-19 15:42:55 +01:00
Michael Niedermayer
9e008ed1b4 avformat/movenc: Fix use of uninitialized variable (ret)
Fixed CID1270823

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2015-02-18 16:33:15 +01:00