Commit Graph

13224 Commits

Author SHA1 Message Date
Michael Niedermayer
4ed0b28a45 Merge commit 'cabb1681697555e2c319c37c1f30f149207e9434'
* commit 'cabb1681697555e2c319c37c1f30f149207e9434':
  mpegts: Remove one memcpy per packet

Conflicts:
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 15:11:55 +02:00
Michael Niedermayer
8878aef048 Merge commit 'daf1e0d3de03bd424016e2a7520e4e94ece5c0ac'
* commit 'daf1e0d3de03bd424016e2a7520e4e94ece5c0ac':
  avio: Add an internal function for reading without copying

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 15:02:27 +02:00
Michael Niedermayer
7ed002d791 Merge commit '22a154e4363b351dd9f321003de01dffebd2fa18'
* commit '22a154e4363b351dd9f321003de01dffebd2fa18':
  build: Add missing img2.o dependency to apetag.o

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 14:56:22 +02:00
Marton Balint
a7bb12a307 mpegts: add fix_teletext_pts mpegts demuxer option
Changes since v1 of the patch:
- enable option by default
- add documentation
- move up PTS override code after PES header parsing, to ensure we use the
  last PCR before the first packet of the teletext PES packet.

The option overrides teletext packet PTS and DTS values with the timestamps
calculated from the PCR of the first program which the teletext stream is part
of and is not discarded.

Using the same teletext PID for multiple programs is possible, therefore we
need some kind of heuristics to know which program PCR we should synchronize
to. Using the first non-discarded PCR pid among the programs of the teletext
stream seemed like a good choice.

The patch does not do PCR interpolation to estimate the PCR of the teltetext
packet, it just uses the last PCR of the program, which may cause a slight
error (0.1 sec) in the teletext packet pts-es.

Based on a patch by Reimar Döffinger.
http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2012-September/131610.html

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 02:47:38 +02:00
Wei-Cheng Pan
f646cd4471 rtp: Make ff_rtp_codec_id() case insensitive
Fixes handling of lower case pcmu

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-05 21:53:52 +02:00
Ben Avison
cabb168169 mpegts: Remove one memcpy per packet
This was being performed to ensure that a complete packet was held in
contiguous memory, prior to parsing the packet. However, the source buffer
is typically large enough that the packet was already contiguous, so it is
beneficial to return the packet by reference in most cases.

         Before          After
         Mean   StdDev   Mean   StdDev  Change
memcpy    720.7  32.7     649.8  25.1   +10.9%
Overall  2372.7  46.1    2291.7  21.8    +3.5%

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-05 15:14:31 +03:00
Ben Avison
daf1e0d3de avio: Add an internal function for reading without copying
As long as there is enough contiguous data in the avio buffer,
just return a pointer to it instead of copying it to the caller
provided buffer.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-05 15:14:25 +03:00
Diego Biurrun
22a154e436 build: Add missing img2.o dependency to apetag.o 2013-08-05 11:38:00 +02:00
Michael Niedermayer
89c3f5a907 avformat/takdec: use init_get_bits8()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-05 10:14:42 +02:00
Michael Niedermayer
77e37c34cb avformat/latmenc: use init_get_bits8()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-05 10:12:46 +02:00
Michael Niedermayer
dd98d9d1ff Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mxfenc: switch to av_reallocp_array() and check allocation errors

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-05 09:57:28 +02:00
Michael Niedermayer
c4f9a4cd2f rdt: make const tables static const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-05 02:53:16 +02:00
Michael Niedermayer
1787432b23 mp3dec: make const tables static const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-05 02:52:41 +02:00
Michael Niedermayer
62cf5c114a avformat/matroskadec: make sipr_bit_rate static const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-04 21:18:49 +02:00
Alexandra Khirnova
7684a36113 mxfenc: switch to av_reallocp_array() and check allocation errors
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-04 16:49:04 +02:00
Andrey Utkin
b7ed18b9bd mpegtsenc: add option tables_version
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 12:44:53 +02:00
Michael Niedermayer
20be5e0a0e Merge commit '7950e519bb094897f957b9a9531cc60ba46cbc91'
* commit '7950e519bb094897f957b9a9531cc60ba46cbc91':
  Disable deprecation warnings for cases where a replacement is available

Conflicts:
	libavcodec/avpacket.c
	libavcodec/pthread.c
	libavcodec/utils.c
	libavdevice/v4l2.c
	libavfilter/avfiltergraph.c
	libavfilter/buffersrc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 10:08:30 +02:00
Michael Niedermayer
a8e963835a Merge commit 'b5a138652ff8a5b987d3e1191e67fd9f6575527e'
* commit 'b5a138652ff8a5b987d3e1191e67fd9f6575527e':
  Give less generic names to global library option arrays

Conflicts:
	libavcodec/options_table.h
	libavfilter/avfilter.c
	libavformat/options_table.h
	libswscale/options.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 09:16:36 +02:00
Michael Niedermayer
8e970a5861 Merge commit '0d6fa3977b016f1b72b0b24b8834ff9222498548'
* commit '0d6fa3977b016f1b72b0b24b8834ff9222498548':
  rtmp: Add seek support

Conflicts:
	Changelog
	libavformat/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-03 09:01:48 +02:00
Michael Niedermayer
0553f2c6e5 avformat/matroskaenc: make 2 tables static that are not used outside matroskaenc
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-02 21:14:59 +02:00
Michael Niedermayer
65dd93209d movenc: make uuids static const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-02 21:14:59 +02:00
Diego Biurrun
7950e519bb Disable deprecation warnings for cases where a replacement is available 2013-08-02 19:19:02 +02:00
Diego Biurrun
b5a138652f Give less generic names to global library option arrays 2013-08-02 19:19:02 +02:00
Gavriloaie Eugen-Andrei
0d6fa3977b rtmp: Add seek support
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-02 20:11:54 +03:00
Michael Niedermayer
61a28d00e8 flvdec: silence unused warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-02 13:05:16 +02:00
Michael Niedermayer
67291ffd63 Merge commit 'f900f35ac8db4ac30df6fda1c27502c2ef9e6ba5'
* commit 'f900f35ac8db4ac30df6fda1c27502c2ef9e6ba5':
  flvdec: Eliminate completely silly goto

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-02 12:19:21 +02:00
Michael Niedermayer
ae48547a52 Merge commit 'e4529df944616917ae8462f5102253ff7f983093'
* commit 'e4529df944616917ae8462f5102253ff7f983093':
  flvdec: K&R formatting cosmetics

Conflicts:
	libavformat/flvdec.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-02 12:08:56 +02:00
Michael Niedermayer
cb73f84087 Merge commit '390b4d7088b5cecace245fee0c54a57e24dabdf4'
* commit '390b4d7088b5cecace245fee0c54a57e24dabdf4':
  flvdec: Fix = vs. == typo in sample rate check

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-02 11:00:50 +02:00
Michael Niedermayer
ca1b029108 Merge commit 'fd8f91e3f44a2bdbefaaebead388133c5fdd3423'
* commit 'fd8f91e3f44a2bdbefaaebead388133c5fdd3423':
  rtsp: Simplify code for forming the remote peer url

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-02 10:39:46 +02:00
Marton Balint
d75d911223 mpegts: save last pcr of pcr pids in PES Context
Based on a patch by Reimar Döffinger.
http://lists.ffmpeg.org/pipermail/ffmpeg-devel/2012-September/131610.html

Signed-off-by: Marton Balint <cus@passwd.hu>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-02 03:27:47 +02:00
Carl Eugen Hoyos
fbc0004b4b lavf/movenc: Write disc number and total number of discs as part of metadata.
Fixes ticket #2731.
2013-08-01 16:21:31 +02:00
Carl Eugen Hoyos
bb7f71d9b6 lavf/movenc: Write total number of tracks as part of metadata.
Fixes ticket #2157.
2013-08-01 16:20:58 +02:00
Michael Niedermayer
0f5a40c2a4 Merge commit 'ee37d5811caa8f4ad125a37fe6ce3f9e66cd72f2'
* commit 'ee37d5811caa8f4ad125a37fe6ce3f9e66cd72f2':
  rtpproto: Allow specifying a separate rtcp port in ff_rtp_set_remote_url

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 13:51:44 +02:00
Michael Niedermayer
2ee58af53e Merge commit '1851e1d05d06f6ef3436c667e4354da0f407b226'
* commit '1851e1d05d06f6ef3436c667e4354da0f407b226':
  rtpproto: Check the size before reading buf[1]

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 13:24:57 +02:00
Diego Biurrun
f900f35ac8 flvdec: Eliminate completely silly goto 2013-08-01 12:43:54 +02:00
Diego Biurrun
e4529df944 flvdec: K&R formatting cosmetics 2013-08-01 12:43:53 +02:00
Diego Biurrun
390b4d7088 flvdec: Fix = vs. == typo in sample rate check 2013-08-01 12:43:53 +02:00
Michael Niedermayer
fcccb4c11d Merge commit 'b7e6da988bfd5def40ccf3476eb8ce2f98a969a5'
* commit 'b7e6da988bfd5def40ccf3476eb8ce2f98a969a5':
  rtpproto: Move rtpproto specific function declarations to a separate header

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 12:03:24 +02:00
Michael Niedermayer
d6b37de4d4 Merge commit '892b0be1dfbdeaf71235fb6c593286e4f5c7e4ec'
* commit '892b0be1dfbdeaf71235fb6c593286e4f5c7e4ec':
  rtpproto: Simplify the rtp_read function by looping over the fds

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 11:58:17 +02:00
Michael Niedermayer
b39f012dee Merge commit '7531588fffbca1f0afdcc06635999c00dfc16ca6'
* commit '7531588fffbca1f0afdcc06635999c00dfc16ca6':
  rtpproto: Remove a misplaced comment

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 11:53:54 +02:00
Michael Niedermayer
d2c613dd14 Merge commit '54e03ff6af8a070f1055edd26028f3f7b2e2ca8e'
* commit '54e03ff6af8a070f1055edd26028f3f7b2e2ca8e':
  rtpproto: Support nonblocking reads

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 11:47:42 +02:00
Michael Niedermayer
57b8ce414b Merge commit '2e814d0329aded98c811d0502839618f08642685'
* commit '2e814d0329aded98c811d0502839618f08642685':
  rtpenc: Simplify code by introducing a macro for rescaling NTP timestamps

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-01 11:42:30 +02:00
Martin Storsjö
fd8f91e3f4 rtsp: Simplify code for forming the remote peer url
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-01 12:11:17 +03:00
Martin Storsjö
ee37d5811c rtpproto: Allow specifying a separate rtcp port in ff_rtp_set_remote_url
A separate rtcp port can already be set when opening the rtp
protocol normally, but when doing port setup as in RTSP (where
we first need to open the local ports and pass them to the peer,
and only then receive the remote peer port numbers), we didn't
check the same url parameter as in the normal open routine.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-01 10:26:17 +03:00
Martin Storsjö
1851e1d05d rtpproto: Check the size before reading buf[1]
I doubt that anyone ever would try to send a 1 byte packet
via the RTP protocol, but check just in case - it shouldn't
crash at least.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-01 09:41:21 +03:00
Andrey Utkin
a8f171151f file: Add 'blocksize' option
Interruptibility of file operations is strongly desirable in case of
slow storage access, e.g. mounted network share.
This commit introduces possibility to limit data quantity transferred by
'file' protocol at once. By default, old behaviour is preserved and data
is still tried to be transferred without block size limitation.

Note that file I/O operation still may block (or even freeze) inside of
single read(2) or write(2) operation.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-31 21:16:54 +02:00
Martin Storsjö
b7e6da988b rtpproto: Move rtpproto specific function declarations to a separate header
Mixing these with the rtp depacketizer functions in rtpdec.h is
no good.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-31 21:12:34 +03:00
Martin Storsjö
892b0be1df rtpproto: Simplify the rtp_read function by looping over the fds
This avoids having duplicate code where only the fd parameter
differs.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-31 21:12:34 +03:00
Martin Storsjö
7531588fff rtpproto: Remove a misplaced comment
The fdset is a pollfd array nowadays, and it is already populated
at this point.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-31 21:12:34 +03:00
Martin Storsjö
54e03ff6af rtpproto: Support nonblocking reads
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-31 21:12:34 +03:00