Commit Graph

13576 Commits

Author SHA1 Message Date
Michael Niedermayer
2501f6d3d6 avformat/movenc: Use the rate from av_timecode_init_from_string() for tmcd
Fixes Ticket2892
Reveiwed-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-02 17:16:20 +02:00
Michael Niedermayer
cb4d05e7f2 Merge commit 'a42e3a6700547e4e49445bda81d3a89ec3e081a9'
* commit 'a42e3a6700547e4e49445bda81d3a89ec3e081a9':
  pcm_dvd: consolidate pieces from pcm.c and mpeg.c

Conflicts:
	libavcodec/pcm.c
	libavcodec/version.h
	libavformat/mpeg.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-01 13:00:08 +02:00
Michael Niedermayer
0388203098 avformat/utils: fix duration_fields calculation when need_parsing=0
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-01 00:46:14 +02:00
Michael Niedermayer
8349be852b avformat/lxfdec: use a parser to parse video frame headers
lxf needs a parser (or would need to set a few fields explicitly).
Fixes Ticket2917

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-01 00:21:37 +02:00
Christian Schmidt
a42e3a6700 pcm_dvd: consolidate pieces from pcm.c and mpeg.c
Remove the header decoding for PCM audio from mpeg.c and the
20/24bit parts from pcm.c and merge them into a new decoder in
pcm-dvd.c.

The decoder has added support for samples that span multiple
packets and modified 20/24bit group decoding. Both is needed to
decode samples that have been generated with DVD-Lab Pro 2. The
decoding of 16bit PCM and two channel 24bit is identical to
before. No other samples are known to verify the correctness of
the encoding this software does.
The complete list of tested formats is
48kHz/16bit/2-8 channels
48kHz/24bit/2-5 channels
96kHz/16bit/2-4 channels
96kHz/24bit/2 channels

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-31 11:26:29 +02:00
Michael Niedermayer
227a0eb5a9 avformat/avidec: match first index and first packet size=0 handling
Fixes Ticket2861

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-31 03:08:25 +02:00
Michael Niedermayer
5c504e4df7 vformat/subtitles: check av_copy_packets return code
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-30 21:36:58 +02:00
Thilo Borgmann
d814a839ac Reinstate proper FFmpeg license for all files. 2013-08-30 15:47:38 +00:00
Michael Niedermayer
5f9b1aae50 Merge commit '6454c44f9f74dbaed17d32cf0eaec185386c27fa'
* commit '6454c44f9f74dbaed17d32cf0eaec185386c27fa':
  rtmpproto: Fix limelight authentication with abbreviated app names

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 13:43:07 +02:00
Lukasz Marek
f3ace37a3b lavf/ftp: fix possible crash 2013-08-29 01:57:38 +02:00
Michael Niedermayer
c4810fbe4f avformat/utils: fix av_probe_input_buffer2() so it returns the probe score
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-29 01:15:15 +02:00
Michael Niedermayer
e31db621bf avformat: export probe score
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-28 22:18:57 +02:00
Martin Storsjö
6454c44f9f rtmpproto: Fix limelight authentication with abbreviated app names
When streaming to limelight, the app name is either a full
"appname/subaccount" or "appname/_definst_". In the latter case,
the app name can be simplified into simply "appname", but the
authentication hashing assumes the /_definst_ still to be present.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-28 17:54:51 +03:00
Michael Niedermayer
72196a4b8d Merge commit '310cc4bf82824f09bdd0b9147ed725cdbeaf9bdd'
* commit '310cc4bf82824f09bdd0b9147ed725cdbeaf9bdd':
  smoothstreamingenc: Write to a temp file while updating the manifest

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-28 12:34:33 +02:00
Michael Niedermayer
946902e5b9 Merge commit 'f4634ae8a83d13a1abf3baac8956a3111aa09ed2'
* commit 'f4634ae8a83d13a1abf3baac8956a3111aa09ed2':
  flv: Fix the help string

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-28 12:03:06 +02:00
Michael Niedermayer
87d38ad803 Merge commit 'f812eeda17e38797df5cb733ce99cdfd829d84ca'
* commit 'f812eeda17e38797df5cb733ce99cdfd829d84ca':
  matroskaenc: Fix writing TRACKDEFAULTFLAG

Conflicts:
	libavformat/matroskaenc.c
	tests/fate/wavpack.mak
	tests/ref/lavf/mkv
	tests/ref/seek/lavf-mkv

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-28 11:33:59 +02:00
Martin Storsjö
310cc4bf82 smoothstreamingenc: Write to a temp file while updating the manifest
If a client tries to read the file while it's being updated, the client
would get an incomplete manifest. Instead write to a separate temp file
and atomically rename it to replace the previous one.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-27 19:44:31 +03:00
Luca Barbato
f4634ae8a8 flv: Fix the help string 2013-08-27 14:38:54 +02:00
John Stebbins
f812eeda17 matroskaenc: Fix writing TRACKDEFAULTFLAG
The element was only being written when the value == 1.  But the default
value of this element is 1, so this has no useful effect.  This element
needs to be written when the value == 0.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-27 14:00:31 +02:00
Michael Niedermayer
231201382e Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Check for errors from mov_create_chapter_track

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-27 12:52:17 +02:00
Michael Niedermayer
da2038221b Merge commit '2bbad1f94cbc5eab0aa2d937bc79d085477d0242'
* commit '2bbad1f94cbc5eab0aa2d937bc79d085477d0242':
  movenc: Properly free allocated data on failures in mov_write_header

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-27 12:47:04 +02:00
Michael Niedermayer
ef4fcb30c4 Merge commit '3559fb97c459c88b4f1d0eef80d55933d3b7fabe'
* commit '3559fb97c459c88b4f1d0eef80d55933d3b7fabe':
  movenc: Check that tracks->enc exists before trying to free extradata

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-27 12:33:39 +02:00
Michael Niedermayer
0bd15938ec Merge commit '4d122b01e4ce539269ee2df193b061772c7374f6'
* commit '4d122b01e4ce539269ee2df193b061772c7374f6':
  movenc: Check for allocation failures in mov_create_chapter_track

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-27 12:26:27 +02:00
Martin Storsjö
0fb3e1c6ce movenc: Check for errors from mov_create_chapter_track
On failures in the write_trailer function, we could also ignore
the errors and try to finish the file despite these errors (which
would only leave an incomplete chapters track). It's probably better
to signal the error clearly to the caller though (and if this
function failed there's no guarantee that there's enough memory to
finish the trailer either).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-27 10:26:10 +03:00
Martin Storsjö
2bbad1f94c movenc: Properly free allocated data on failures in mov_write_header
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-27 10:26:08 +03:00
Martin Storsjö
3559fb97c4 movenc: Check that tracks->enc exists before trying to free extradata
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-27 10:26:07 +03:00
Martin Storsjö
4d122b01e4 movenc: Check for allocation failures in mov_create_chapter_track
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-27 10:25:55 +03:00
Michael Niedermayer
535d9a9386 avformat/ftp: make const tables static const
Reviewed-by: Lukasz M <lukasz.m.luki@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-27 03:55:45 +02:00
Michael Niedermayer
e43c672b56 Merge commit 'b89e8759e053792704741d08cbc41c9ac3c7ed63'
* commit 'b89e8759e053792704741d08cbc41c9ac3c7ed63':
  mov: Write tmcd extradata

This commit should make no difference as we had tmcd support
already, which is not changed.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-26 14:36:00 +02:00
Michael Niedermayer
d3ff77023e Merge commit '5b41eb91e0083755de8c35e8cd005896ec3ab31f'
* commit '5b41eb91e0083755de8c35e8cd005896ec3ab31f':
  mov: Parse tmcd extradata

Conflicts:
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-26 14:26:40 +02:00
Michael Niedermayer
b32a6da100 Merge commit '0b5af5cf1224add1769b1094b9924ecf10de3d7d'
* commit '0b5af5cf1224add1769b1094b9924ecf10de3d7d':
  mov: Refactor multiple stsd skipping in mov_mov_skip_multiple_stsd

Conflicts:
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-26 13:59:28 +02:00
Michael Niedermayer
e299aa78d9 Merge commit '08504380ddf25d6905e189e9bf52e7a4c771a415'
* commit '08504380ddf25d6905e189e9bf52e7a4c771a415':
  mov: Refactor codec specific final steps in mov_finalize_stsd_codec

Conflicts:
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-26 13:28:04 +02:00
Michael Niedermayer
80e0599402 Merge commit 'dc518a3ae21e7b6420131b813cfc6bcdcad26b7e'
* commit 'dc518a3ae21e7b6420131b813cfc6bcdcad26b7e':
  mov: Refactor subtitle specific parsing in mov_parse_stsd_subtitle

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-26 13:18:43 +02:00
Michael Niedermayer
9748f1477d Merge commit 'ef196beeb50e8e024ed5a560a1d39eff4a296ce4'
* commit 'ef196beeb50e8e024ed5a560a1d39eff4a296ce4':
  mov: Refactor audio specific parsing in mov_parse_stsd_audio

Conflicts:
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-26 13:14:09 +02:00
Michael Niedermayer
bc6370b622 Merge commit 'a3b53ff062eaccdaa28964899c63520ef2978c2e'
* commit 'a3b53ff062eaccdaa28964899c63520ef2978c2e':
  mov: Refactor video specific parsing in mov_parse_stsd_video

Conflicts:
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-26 13:07:13 +02:00
Michael Niedermayer
f5a0c205d9 Merge commit 'bf9856250584228678963ce8f11c54f85005d783'
* commit 'bf9856250584228678963ce8f11c54f85005d783':
  mov: Refactor codec id selection in mov_codec_id

Conflicts:
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-26 12:44:29 +02:00
Michael Niedermayer
8d679bc7e6 avformat/mp3dec: improve detection of mp3s with huge id3 tags
When a id3 tag is larger than the amount of space we will probe
give it a score similar to what a .mp3 extension would have given it

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-26 00:57:35 +02:00
Michael Niedermayer
a9d1a7c79b avformat: move PROBE_BUF_M* to internal.h
They will be used by the mp3 probe function in the next commit

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-26 00:54:30 +02:00
Michael Niedermayer
22fbc7f8be avformat/tcp: fix pointer to int warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-25 19:44:40 +02:00
Luca Barbato
b89e8759e0 mov: Write tmcd extradata 2013-08-25 13:49:21 +02:00
Luca Barbato
5b41eb91e0 mov: Parse tmcd extradata 2013-08-25 13:49:13 +02:00
Michael Niedermayer
88909beca3 avcodec/movenc: move chapter_properties under the #if of the code that uses it
Fixes warning about unused variable

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-24 23:23:00 +02:00
Luca Barbato
0b5af5cf12 mov: Refactor multiple stsd skipping in mov_mov_skip_multiple_stsd 2013-08-24 17:02:23 +02:00
Luca Barbato
08504380dd mov: Refactor codec specific final steps in mov_finalize_stsd_codec 2013-08-24 17:02:23 +02:00
Luca Barbato
dc518a3ae2 mov: Refactor subtitle specific parsing in mov_parse_stsd_subtitle 2013-08-24 17:02:23 +02:00
Luca Barbato
ef196beeb5 mov: Refactor audio specific parsing in mov_parse_stsd_audio 2013-08-24 17:02:23 +02:00
Luca Barbato
a3b53ff062 mov: Refactor video specific parsing in mov_parse_stsd_video 2013-08-24 17:02:23 +02:00
Luca Barbato
bf98562505 mov: Refactor codec id selection in mov_codec_id 2013-08-24 17:02:23 +02:00
Michael Niedermayer
aadfadd784 avformat/redspark: check coef_off
Fixes out of array reads

Found-by: Laurent Butti <laurentb@gmail.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-23 20:05:35 +02:00
Michael Niedermayer
800ea20cad Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Make tkhd "enabled" flag QuickTime compatible

Conflicts:
	libavformat/movenc.c
	tests/ref/acodec/alac
	tests/ref/acodec/pcm-s16be
	tests/ref/acodec/pcm-s24be
	tests/ref/acodec/pcm-s32be
	tests/ref/acodec/pcm-s8
	tests/ref/lavf/mov
	tests/ref/vsynth/vsynth1-dnxhd-1080i
	tests/ref/vsynth/vsynth1-mpeg4
	tests/ref/vsynth/vsynth1-prores
	tests/ref/vsynth/vsynth1-qtrle
	tests/ref/vsynth/vsynth1-svq1
	tests/ref/vsynth/vsynth2-dnxhd-1080i
	tests/ref/vsynth/vsynth2-mpeg4
	tests/ref/vsynth/vsynth2-prores
	tests/ref/vsynth/vsynth2-qtrle
	tests/ref/vsynth/vsynth2-svq1

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-23 13:49:24 +02:00
Michael Niedermayer
c6f4a3a708 Merge commit '1f70a5ad284b33e8b3e2b40a5cb33055419781b7'
* commit '1f70a5ad284b33e8b3e2b40a5cb33055419781b7':
  mov: use tkhd enabled flag to set the default track

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-23 13:27:34 +02:00
Stefano Sabatini
0be3be9011 lavf/tee: copy metadata to output chained muxers 2013-08-23 12:27:09 +02:00
John Stebbins
30ce289074 movenc: Make tkhd "enabled" flag QuickTime compatible
QuickTime will play multiple audio tracks concurrently if this flag is
set for multiple audio tracks.  And if no subtitle track has this flag
set, QuickTime will show no subtitles in the subtitle menu.

Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-23 09:55:42 +02:00
John Stebbins
1f70a5ad28 mov: use tkhd enabled flag to set the default track
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-23 09:24:22 +02:00
Michael Niedermayer
c443689afb avformat/movenc: use av_freep() instead of av_free() except for local variables before return
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-23 00:31:15 +02:00
Stefano Sabatini
7af7b45c38 lavf/image2: extend start_number range to accept zero
Address trac ticket #2884.
2013-08-22 14:26:23 +02:00
Michael Niedermayer
25e4ec6aa1 Merge commit '60198742ff851f11a3757c713fc75a9c19b88566'
* commit '60198742ff851f11a3757c713fc75a9c19b88566':
  movenc: fix detection of 64bit offset requirement

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-22 14:16:52 +02:00
Michael Niedermayer
606a30c5a1 Merge commit 'fe5d5a8ffcafdc14c0d26eaea6464c89e120cc9e'
* commit 'fe5d5a8ffcafdc14c0d26eaea6464c89e120cc9e':
  movenc: Make chapter track QuickTime compatible

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-22 13:58:23 +02:00
Michael Niedermayer
d68adbd666 Merge commit 'f8ef91ff3d6bb83d601d816ef9368f911021c64b'
* commit 'f8ef91ff3d6bb83d601d816ef9368f911021c64b':
  movenc: add faststart option for web streaming

Conflicts:
	doc/muxers.texi
	libavformat/movenc.c
	libavformat/movenc.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-22 13:37:16 +02:00
Stefano Sabatini
eadb3ad758 lavf/tee: initialize ret in parse_bsfs()
Fix spurious failures.
2013-08-22 09:52:54 +02:00
Stefano Sabatini
5ae3563359 lavf/tee: add special select option 2013-08-21 17:44:35 +02:00
Clément Bœsch
60198742ff movenc: fix detection of 64bit offset requirement
The old method doesn't work when moov is relocated to beginning of file

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-21 14:20:33 +01:00
John Stebbins
fe5d5a8ffc movenc: Make chapter track QuickTime compatible
QuickTime requires that the stsd.text box be completely filled in.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-21 14:20:33 +01:00
Clément Bœsch
f8ef91ff3d movenc: add faststart option for web streaming
Faststart moves the moov atom to the beginning of the file and rewrites
the rest of the file after muxing is complete.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-21 14:20:33 +01:00
Michael Niedermayer
a76390d100 Merge commit '6c786765cd5eb794dedd4a0970dfe689b16dfeeb'
* commit '6c786765cd5eb794dedd4a0970dfe689b16dfeeb':
  movenc: Allow chapters to be written in trailer

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-21 11:00:26 +02:00
Michael Niedermayer
8d63aaed1e Merge commit 'db03cb37fd9650b4a7c752d24a2e84ff27508ee8'
* commit 'db03cb37fd9650b4a7c752d24a2e84ff27508ee8':
  movenc: Allow chapter track in default MODE_MP4

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-21 10:45:27 +02:00
Michael Niedermayer
9ab8de4b23 Merge commit '64af59bc4916fac5578b31c89da13c30b591bddf'
* commit '64af59bc4916fac5578b31c89da13c30b591bddf':
  avformat: Fix references to removed av_close_input_file in Doxygen

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-21 10:38:45 +02:00
Michael Niedermayer
be03912a78 avformat/unix: reshuffle #includes
This should fix openbsd while hopefully also working on solaris & android

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-21 05:51:41 +02:00
Michael Niedermayer
97e165cdae avformat/unix: include sys/socket.h
unbreak android ndk r8 build

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-21 00:25:51 +02:00
John Stebbins
6c786765cd movenc: Allow chapters to be written in trailer
This allows creation of frame accurate chapter marks from sources
like DVD and BD where the precise chapter location is not known until
the chapter mark has been reached during reading.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-20 15:18:42 +01:00
John Stebbins
db03cb37fd movenc: Allow chapter track in default MODE_MP4
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-20 15:18:42 +01:00
Michael Niedermayer
3d64845600 movenc: ilbc needs audio_vbr set.
Without this the block_align or bitrate value is not available to the decoder

Fixes Ticket2858

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-20 14:18:24 +02:00
Diego Biurrun
64af59bc49 avformat: Fix references to removed av_close_input_file in Doxygen 2013-08-20 13:33:47 +02:00
Michael Niedermayer
fb679d5374 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  mov: Prevent segfaults on mov_write_hdlr_tag

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-20 12:48:52 +02:00
Michael Niedermayer
eec75e0a1f Merge commit '22de0f8369f1f3edf1a55e1d275f3c07c617b53e'
* commit '22de0f8369f1f3edf1a55e1d275f3c07c617b53e':
  mov: Compute max duration among the tracks with a timescale

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-20 12:34:54 +02:00
Michael Niedermayer
4a6f1be170 Merge commit '39523030108815242178ac5e209c83070bd1baef'
* commit '39523030108815242178ac5e209c83070bd1baef':
  mov: Set the timescale for data streams

Conflicts:
	libavformat/movenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-20 12:16:31 +02:00
Michael Niedermayer
e1acfd3cb0 Merge commit 'b886f5c2f1e71b3e60e4265c500158d392b4b9a4'
* commit 'b886f5c2f1e71b3e60e4265c500158d392b4b9a4':
  mkv: Allow flushing the current cluster in progress

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

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-20 11:44:25 +02:00
Michael Niedermayer
d169b56b7b Merge commit '59f595921eb2b848a80a74aa81b6bb43038c9ebe'
* commit '59f595921eb2b848a80a74aa81b6bb43038c9ebe':
  mkv: Flush the old cluster before writing a new one

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-20 11:30:55 +02:00
Michael Niedermayer
ac957bc60c Merge commit '98308bd44face14ea3142b501d16226eec23b75a'
* commit '98308bd44face14ea3142b501d16226eec23b75a':
  mkv: Add options for specifying cluster limits

Conflicts:
	libavformat/matroskaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-20 11:15:11 +02:00
Michael Niedermayer
976de369dd Merge commit '148fbdd1c2a2a88a78ba9fd152c81c840bdb205a'
* commit '148fbdd1c2a2a88a78ba9fd152c81c840bdb205a':
  mkv: Refactor mkv_write_packet

Conflicts:
	libavformat/matroskaenc.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-20 11:05:02 +02:00
Luca Barbato
67400f6b62 mov: Prevent segfaults on mov_write_hdlr_tag
Do not segfault when writing tracks such as tmcd by writing them down
as generic DataHandlers if not known.
2013-08-20 00:22:58 +02:00
Luca Barbato
22de0f8369 mov: Compute max duration among the tracks with a timescale
Prevent an assert.
2013-08-20 00:22:58 +02:00
Luca Barbato
3952303010 mov: Set the timescale for data streams
Data streams have a defined timebase, do not ignore it.
2013-08-20 00:22:58 +02:00
Martin Storsjö
b886f5c2f1 mkv: Allow flushing the current cluster in progress
Allow emitting the current cluster that is being written before
starting a new one, simplifying how to figure out where clusters
are positioned in the output stream (for live streaming).

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-19 22:47:07 +02:00
Luca Barbato
59f595921e mkv: Flush the old cluster before writing a new one
This simplifies keeping track of cluster boundaries for e.g.
livestreaming of WebM.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-19 22:47:06 +02:00
Luca Barbato
98308bd44f mkv: Add options for specifying cluster limits
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-19 22:46:31 +02:00
Matthew Heaney
818ebe930f avformat/matroskadec: add WebVTT support
WebM files now support inband text tracks, as described in the
following specification:

http://wiki.webmproject.org/webm-metadata/temporal-metadata/webvtt-in-webm

The Matroska demuxer now detects the presence of WebVTT tracks,
synthesizing WebVTT packets (having codec id AV_CODEC_ID_WEBVTT) and
pushing them downstream in the normal way.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-19 22:34:57 +02:00
Luca Barbato
148fbdd1c2 mkv: Refactor mkv_write_packet
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-19 17:21:15 +02:00
Paul B Mahol
daede1e3fa matroskaenc: remove unneeded wavpack tag
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-08-19 09:41:18 +00:00
Reimar Döffinger
9a27acae9e ogg: Fix potential infinite discard loop
Seeking in certain broken files would cause ogg_read_timestamp
to fail because ogg_packet would go into a state where all packets
of stream 1 would be discarded until the end of the stream.

Bug-Id: 553
CC: libav-stable@libav.org

Signed-off-by: Jan Gerber <j@v2v.cc>
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2013-08-19 05:20:39 +02:00
Carl Eugen Hoyos
037af63b33 Fix frame width and height for some targa_y216 samples.
Fixes ticket #2864.
2013-08-18 23:37:27 +02:00
Michael Niedermayer
d73cbc22c5 avformat/mpegts: resync from the smallest packet size on
This avoids the loss of a packet in many cases if the packet size was wrong.
It also improves detection of packet size changes

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 22:59:04 +02:00
Michael Niedermayer
b4429c259a mpegts_get_pcr: dont loose a packet when resyncing
This matches how read_packet() works

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 22:48:19 +02:00
Michael Niedermayer
0f2f65bd58 mpegts: fix pos47_full
The value was off by a packet

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 22:45:39 +02:00
Michael Niedermayer
ee7f2609a0 avformat/mpegts: print packet size warning only if new size differs from old
No case is known to have triggered this, but its more correct to check that the
new size differs.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 22:45:39 +02:00
Michael Niedermayer
c666c59ac1 mpegts: reanalyze packet size on mismatches
Fixes Ticket1812
Fixes Ticket2838

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 16:40:18 +02:00
Michael Niedermayer
45975ab7a1 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  movenc: Indicate that negative timestamps are supported

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 12:40:22 +02:00
Michael Niedermayer
338f8b2eaf avformat/matroskadec: check out_samplerate before using it in av_rescale()
Prevent assertion failure with damaged input

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 02:34:48 +02:00
James Almer
af248fa117 matroskadec: Improve TTA duration calculation
Calculate the duration as accurately as possible to improve decoding of samples
where the last frame is smaller than the rest.

Example:
Take lossless-audio/luckynight-partial.tak from the FATE suit and convert it
to TTA muxed into matroska:

ffmpeg -i $(SAMPLES)/lossless-audio/luckynight-partial.tak -c:a tta lucky.mka

The framemd5 output for lucky.mka without this patch:

0,          0,          0,    46080,   184320, 7c3751ddd571d2903c3cf0ab4b3e3d0a
0,      46080,      46080,    46080,   184320, 6b70c782ba1da3f933fde2daa4f96b73
0,      92160,      92160,    46080,   184320, dcf70d89c54b9a4f0b302d4ec4fb302d
0,     138240,     138240,    46080,   184320, 48713ca38b388d2ea4abf5b86ed1226f
0,     184320,     184320,    46080,   184320, 12188a23648e7ebfb07cd6fe9197b2ea
0,     230400,     230400,    46080,   184320, 49653ab8186a5d4a044ed284671a26e0
0,     276480,     276480,    46080,   184320, 5e82c6a7fe58c7ea612c03a0a2927dd4
0,     322560,     322560,    46080,   184320, 83dc449dbd9eab5f2e8ad2b4403d6a21
0,     368640,     368640,    46080,   184320, bdd6b92c23d30978d4e802d305b0fc49

With this patch:

0,          0,          0,    46080,   184320, 7c3751ddd571d2903c3cf0ab4b3e3d0a
0,      46080,      46080,    46080,   184320, 6b70c782ba1da3f933fde2daa4f96b73
0,      92160,      92160,    46080,   184320, dcf70d89c54b9a4f0b302d4ec4fb302d
0,     138240,     138240,    46080,   184320, 48713ca38b388d2ea4abf5b86ed1226f
0,     184320,     184320,    46080,   184320, 12188a23648e7ebfb07cd6fe9197b2ea
0,     230400,     230400,    46080,   184320, 49653ab8186a5d4a044ed284671a26e0
0,     276480,     276480,    46080,   184320, 5e82c6a7fe58c7ea612c03a0a2927dd4
0,     322560,     322560,    46080,   184320, 83dc449dbd9eab5f2e8ad2b4403d6a21
0,     368640,     368640,    46080,   184320, bdd6b92c23d30978d4e802d305b0fc49
0,     414720,     414720,     4230,    16920, b50b440c5bbcecb8e9fbece643447593

The duration without this patch was calculated as 418950000000, which is bigger
than uint32_t and as such stored as 2338172288.
With this patch the duration is correctly calculated as 418950.

Signed-off-by: James Almer <jamrial@gmail.com>
Approved-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 02:34:39 +02:00
Vignesh Venkatasubramanian
571efd9729 lavf/matroska: Adding the new SeekPreRoll element
In order to encapsuate Opus in Matroska, there is a new element
that has been added to the Matroska Spec, SeekPreRoll. It has the
duration in nanoseconds that has to be decoded before every seek.
Spec: http://matroska.org/technical/specs/index.html#SeekPreRoll
Proposal for encapsulateing Opus in Matroska:
http://wiki.xiph.org/MatroskaOpus

Signed-off-by: Vignesh Venkatasubramanian <vigneshv@google.com>
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-18 00:04:08 +02:00
Martin Storsjö
0a14fefd68 movenc: Indicate that negative timestamps are supported
The mov/mp4 muxer has support for handling negative timestamps
via edit lists (which customarily is used for handling the 1-frame
delay due to B-frames as well).

Using the muxer's native way of handling it is better than using
the generic offsetting. The generic offsetting is a bit too
crude when e.g. the timebase of one track is 1/fps, where the
edit lists can handle it accurately.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-17 22:46:11 +01:00
Stephen Hutchinson
2c25e83b1d avisynth: Support video input from AviSynth 2.5 properly.
Uses the 2.5 compatibility header included with the variant of
FFMS2 that uses AviSynth's C-interface. A copy of this header is
now provided in compat/avisynth.

avs_get_row_size_p and avs_get_height_p changed between versions
2.5 and 2.6. Since the avisynth_c.h header that avformat uses
assumes AviSynth 2.6, it would cause 2.5 to crash if given any
kind of real video (the Version() function was known to work,
though).

AvxSynth was unaffected by this issue because, despite being based
on AviSynth 2.5.8 and using 2.5.8's interface version number of 3,
it actually uses 2.6's versions of these functions.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-17 14:27:25 +02:00
Stefano Sabatini
faf7c35655 lavf/tee: add support for bitstream filtering
This allows to apply different bitstream filters to different outputs,
with no need to transcode.
2013-08-16 17:58:58 +02:00
Michael Niedermayer
50c0837801 Merge commit '09c93b1b957f2049ea5fd8fb0e6f4d82680172f2'
* commit '09c93b1b957f2049ea5fd8fb0e6f4d82680172f2':
  hlsenc: Append the last incomplete segment when closing the output

Conflicts:
	libavformat/hlsenc.c

See: 4630dfd1eb
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 14:03:44 +02:00
Michael Niedermayer
dff205cca3 Merge commit 'c9031c7c1446a1a63eff7c0bf50d1ee559adf3fb'
* commit 'c9031c7c1446a1a63eff7c0bf50d1ee559adf3fb':
  hlsenc: Add a proper dependency on the mpegts muxer

Conflicts:
	libavformat/Makefile

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 13:43:31 +02:00
Michael Niedermayer
e1ec7990fe Merge commit '4b054a3400f728c54470ee6a1eefe1d82420f6a2'
* commit '4b054a3400f728c54470ee6a1eefe1d82420f6a2':
  rtpproto: Check the right feature detection macro

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 12:31:15 +02:00
Michael Niedermayer
165e42b542 Merge commit '163a729725c6eb0081b0af41a7279f7d19aee86e'
* commit '163a729725c6eb0081b0af41a7279f7d19aee86e':
  electronicarts: Let functions always returning the same value return void

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 12:25:07 +02:00
Michael Niedermayer
4195321a82 Merge commit '4908c8ef2706d98022bf27a5c5bca1fe109e7529'
* commit '4908c8ef2706d98022bf27a5c5bca1fe109e7529':
  electronicarts: Improve some function/variable names

Conflicts:
	libavformat/electronicarts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 12:14:32 +02:00
Michael Niedermayer
6bba695785 Merge commit 'a90cff137b2aca89380b0acad41cd7bb05619ece'
* commit 'a90cff137b2aca89380b0acad41cd7bb05619ece':
  electronicarts: comment wording fixes

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 12:08:47 +02:00
Michael Niedermayer
6a4e55a246 Merge commit '288f2ffb57ae9e9eee2748aca26da3aeb3ca6f6c'
* commit '288f2ffb57ae9e9eee2748aca26da3aeb3ca6f6c':
  electronicarts: Remove bogus function documentation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 12:07:49 +02:00
Michael Niedermayer
a87cf3689e Merge commit '8747fce91fca6bb8e9936497f2de05c905cf43b5'
* commit '8747fce91fca6bb8e9936497f2de05c905cf43b5':
  electronicarts: K&R formatting cosmetics

Conflicts:
	libavformat/electronicarts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-16 12:01:22 +02:00
Carl Eugen Hoyos
9d86bfc259 hlsenc: Don't reset the number variable when wrapping
The counter itself shouldn't be wrapped, since it is used for
determining end_pts for the next segment - only wrap the number
used for the segment file name.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-15 22:41:19 +03:00
Stefano Sabatini
09c93b1b95 hlsenc: Append the last incomplete segment when closing the output
Also avoid comparing NOPTS values.

Bug-id: 551
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-15 22:41:18 +03:00
Martin Storsjö
c9031c7c14 hlsenc: Add a proper dependency on the mpegts muxer
The hls muxer itself doesn't have any direct (object file level)
dependencies on mpegtsenc.o, and including that object file
directly doesn't ensure that it is registered so that the muxer
actually is accessible.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-15 22:41:11 +03:00
Piotr Bandurski
165b65771d avformat/riff: add DM4V FourCC
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-15 15:46:25 +02:00
Martin Storsjö
4b054a3400 rtpproto: Check the right feature detection macro
IPPROTO_IPV6 is unrelated here (it's only used in udp.c for
multicast sockopts), check for support for the sockaddr_in6
struct itself.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-15 15:35:41 +03:00
Diego Biurrun
163a729725 electronicarts: Let functions always returning the same value return void 2013-08-15 12:24:43 +02:00
Diego Biurrun
4908c8ef27 electronicarts: Improve some function/variable names 2013-08-15 12:24:42 +02:00
Diego Biurrun
a90cff137b electronicarts: comment wording fixes 2013-08-15 12:24:42 +02:00
Diego Biurrun
288f2ffb57 electronicarts: Remove bogus function documentation 2013-08-15 12:24:42 +02:00
Diego Biurrun
8747fce91f electronicarts: K&R formatting cosmetics 2013-08-15 12:24:42 +02:00
Michael Niedermayer
2c959eccc6 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtpproto: Check for the right feature when reading a sockaddr_in6

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-15 11:34:30 +02:00
Dave Yeo
c3386bd5b4 rtpproto: Check for the right feature when reading a sockaddr_in6
Some systems, such as OS/2, define AF_INET6 without a full
implementation.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-15 10:31:43 +03:00
Alexander Strasser
dc2e4c2e53 lavf/wavdec: Fix seeking in files with unaligned offsets
A file with a prepended ID3 tag of an uneven length was found
in the wild.

Check if the wav data starts at an uneven offset and use that
information to correct the seeking calculation in wav_seek_tag,
which used to only seek to even byte positions.

Regression since ac87eaf856

Signed-off-by: Alexander Strasser <eclipse7@gmx.net>
2013-08-14 22:05:41 +02:00
Michael Niedermayer
20904518e9 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  sdp: Add an option for sending RTCP packets to the source of the last packets

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-14 12:42:44 +02:00
Michael Niedermayer
2425be894a Merge commit '6b58e11a8331690ec32e9869db89ae10c54614e9'
* commit '6b58e11a8331690ec32e9869db89ae10c54614e9':
  rtpproto: Add an option for writing return packets to the address of the last received packets

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-14 12:38:11 +02:00
Michael Niedermayer
1a01f367a4 Merge commit '2427ac6ccd868811d1fe9df7c64c50ca58abe6f6'
* commit '2427ac6ccd868811d1fe9df7c64c50ca58abe6f6':
  rtpproto: Update the parameter documentation

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-14 12:30:40 +02:00
Michael Niedermayer
ab06436dbf Merge commit '5268bd2900effa59b51e0fede61aacde5e2f0b95'
* commit '5268bd2900effa59b51e0fede61aacde5e2f0b95':
  segafilm: Error out on impossible packet size

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-14 12:25:51 +02:00
Michael Niedermayer
070c22d53a Merge commit '3562684db716d11de0b0dcc52748e9cd90d68132'
* commit '3562684db716d11de0b0dcc52748e9cd90d68132':
  ogg: Always alloc the private context in vorbis_header

Conflicts:
	libavformat/oggparsevorbis.c

See: 18b46a494e
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-14 12:17:02 +02:00
Martin Storsjö
b56fc18b20 sdp: Add an option for sending RTCP packets to the source of the last packets
An SDP description normally only contains the target IP address
and port for the packets. This means that we don't really have
any clue where to send the RTCP RR packets - previously they're
sent to the destination IP written in the SDP (at the same port),
which rarely is the actual peer. And if the source for the packets
is on a different port than the destination, it's never correct.

With a new option, we can choose to send the packets to the
address that the latest packet on each socket arrived from.
---
Some may even argue that this should be the default - perhaps,
but I'd rather keep it optional at first. Additionally, I'm not
sure if sending RTCP RR directly back to the source is
desireable for e.g. multicast.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-14 11:21:33 +03:00
Martin Storsjö
6b58e11a83 rtpproto: Add an option for writing return packets to the address of the last received packets
If we've received packets on the same socket before, the return
packets are sent to that address. If we've only received packets
on the other socket, try to guess the source port for the other
one assuming the basic +1/-1 logic.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-14 11:21:32 +03:00
Martin Storsjö
2427ac6ccd rtpproto: Update the parameter documentation
Move the sources documentation up below the marker for deprecated
otpions. Also mention the new block parameter, that was added
in 749722209.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-13 22:16:53 +03:00
Compn
8e0b6d82b3 riff: add msn audio comment 2013-08-13 09:41:28 -04:00
Luca Barbato
5268bd2900 segafilm: Error out on impossible packet size
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-08-13 15:14:07 +02:00
Luca Barbato
3562684db7 ogg: Always alloc the private context in vorbis_header
It is possible to have an initial broken header and then valid packets.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
2013-08-13 14:04:55 +02:00
Piotr Bandurski
e87fcaa8d5 avformat/riff: treat msn audio like gsm_ms
Fixes decoding of 4 files from Ticket2854

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-13 11:37:44 +02:00
Alexis Ballier
7a48b1c492 Remove FF_API_PKT_DUMP cruft. Not compiled since libavformat 54.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-13 04:18:32 +02:00
Alexis Ballier
ca2378ad04 libavformat/version.h: Drop FF_API_OLD_AVIO (unused and undefined since libavformat 55)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-13 03:26:25 +02:00
Michael Niedermayer
4b101ab02e avformat/asfdec: call ff_read_frame_flush() in asf_read_pts()
flushing just the asf demuxer but not the cores buffers leads to inconsistencies
and a "random" packet position which later causes an assertion failure

Fixes Ticket2853

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-12 22:52:23 +02:00
Kirill Gavrilov
2395ae22ce img2dec: fix typo (double "with with")
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-12 18:04:09 +02:00
wm4
a5ef7960fc ape: check avio_read() return value
This sets pkt->size to absurd values on failure otherwise.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 21:46:09 +02:00
Mark Harris
4ccafaca1c avformat/id3v2enc: use UTF-16 in id3v2.3 APIC frame only if non-ASCII
This makes the encoding of picture descriptions consistent with the
encoding of other text id3 tags and works better with iTunes, which
does not display pictures with some UTF-16 picture descriptions
(including a UTF-16 empty string, i.e. BOM + terminator).  It also
saves a few bytes.

Example:
 ffmpeg -f lavfi -i sine=b=4 -f lavfi -i smptebars -map 0:a -map 1:v \
   -codec:a libmp3lame -codec:v mjpeg -id3v2_version 3 \
   -metadata:s:v comment="Cover (front)" -t 3 -y out.mp3

This example does not set a picture description (-metadata:s:v title=)
so an empty string is written in the id3v2.3 APIC frame.  Without this
patch, UTF-16 is used and the cover art does not display in iTunes.
With the patch the cover art is displayed.  (Note that iTunes does not
display or have a way to set picture descriptions, only the picture
itself, but nevertheless has trouble skipping some UTF-16 descriptions.)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 13:06:40 +02:00
Michael Niedermayer
15c92f8c48 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  rtmp: Do not misuse memcmp

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 11:54:37 +02:00
Michael Niedermayer
6c7a05352f Merge commit '8e1fe345577a42f99591caf8a06c447613449694'
* commit '8e1fe345577a42f99591caf8a06c447613449694':
  rtmp: Detect and warn if the user tries to pass librtmp style parameters

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 11:17:43 +02:00
Michael Niedermayer
06186a3160 Merge commit 'ba5393a609c723ec8ab7f9727c10fef734c09278'
* commit 'ba5393a609c723ec8ab7f9727c10fef734c09278':
  rtmp: rename data_size to size

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 11:11:40 +02:00
Michael Niedermayer
a2b0699f4f Merge commit '4ebc7d659f0da6c1305ca08cf4303959203fff4b'
* commit '4ebc7d659f0da6c1305ca08cf4303959203fff4b':
  rtmp: Use PRId64 when needed.

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-11 11:02:37 +02:00
Luca Barbato
5718e3487b rtmp: Do not misuse memcmp
CC: libav-stable@libav.org
2013-08-11 01:19:27 +02:00
Michael Niedermayer
db4918b72e avformat/tedcaptionsdec: make const arrays static const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-10 18:44:40 +02:00
Martin Storsjö
8e1fe34557 rtmp: Detect and warn if the user tries to pass librtmp style parameters
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-10 18:37:18 +03:00
Luca Barbato
ba5393a609 rtmp: rename data_size to size 2013-08-10 13:49:09 +02:00
Luca Barbato
4ebc7d659f rtmp: Use PRId64 when needed. 2013-08-10 13:48:48 +02:00
Michael Niedermayer
b37ff488b8 Merge remote-tracking branch 'qatar/master'
* qatar/master:
  libavutil: Make avpriv_open a library-internal function on msvcrt

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-10 10:51:03 +02:00
Michael Niedermayer
296eaa84b9 Merge commit '9d5ec50ead97e088d77317e77b18cef06cb3d053'
* commit '9d5ec50ead97e088d77317e77b18cef06cb3d053':
  ff_socket: put out-of-line and fallback to fcntl() for close-on-exec

Conflicts:
	libavformat/network.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-10 10:18:18 +02:00
Reimar Döffinger
d4db7c334b Integrate accessors.h header into internal.h
I have no idea why I added a separate header,
I think there is no good reason for it.

Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-08-10 07:56:42 +02:00
Martin Storsjö
e743e7ae6e libavutil: Make avpriv_open a library-internal function on msvcrt
Add one copy of the function into each of the libraries, similarly
to what we do for log2_tab. When using static libs, only one
copy of the file_open.o object file gets included, while when
using shared libraries, each of them get a copy of its own.

This fixes DLL builds with a statically linked C runtime, where
each DLL effectively has got its own instance of the C runtime,
where file descriptors can't be shared across runtimes.

On systems not using msvcrt, the function is not duplicated.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-10 00:53:33 +03:00
Michael Niedermayer
12538bb9c2 avformat/nut: support planar rgb
Fixes first half of Ticket2274

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-09 23:02:48 +02:00
Michael Niedermayer
f58cd2867a avformat/paf: Fix integer overflow and out of array read
Found-by:  Laurent Butti <laurentb@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-09 13:23:10 +02:00
Rémi Denis-Courmont
9d5ec50ead ff_socket: put out-of-line and fallback to fcntl() for close-on-exec
This supports non-Linux systems (SOCK_CLOEXEC is non-standard) and
older Linux kernels to the extent possible.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-09 11:26:50 +03:00
Michael Niedermayer
0dc17da308 Merge commit 'dfc6b5c81491abf7effb97b23af17ccf7adcd132'
* commit 'dfc6b5c81491abf7effb97b23af17ccf7adcd132':
  file: Move win32 utf8->wchar open wrapper to libavutil

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-09 07:16:38 +02:00
Reimar Döffinger
a48979d715 Reduce MAKE_ACCESSORS code duplication via a new header.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
2013-08-08 20:32:40 +02:00
Martin Storsjö
dfc6b5c814 file: Move win32 utf8->wchar open wrapper to libavutil
When libavformat was changed to use the new avpriv_open function
in 51eb213d00, this silently bypassed the existing wrapper for
win32. Move the win32 wrapper into libavutil/file.c to make sure
it gets called everywhere (not just in the libavformat case).

This makes sure that non-ascii file names gets opened properly
(where file names internally are stored as utf8, but they get
converted to wchar_t and opened with _wsopen).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-08 16:41:33 +03:00
Michael Niedermayer
a0fb608396 Merge commit '5afe1d27912be9b643ffb4ddc21f6d920260dbb0'
* commit '5afe1d27912be9b643ffb4ddc21f6d920260dbb0':
  avio: Add const qualifiers to ffio_read_indirect

Conflicts:
	libavformat/mpegts.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-08 12:04:46 +02:00
Michael Niedermayer
756f865e3b Merge commit '51eb213d00154b8e7856c7667ea62db8b0f663d4'
* commit '51eb213d00154b8e7856c7667ea62db8b0f663d4':
  libavformat: use avpriv_open()

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-08 11:47:12 +02:00
Michael Niedermayer
eb02f0c6e8 Merge commit 'f4d371b9737c0405b3bc46d7ca0c856c0a8616b1'
* commit 'f4d371b9737c0405b3bc46d7ca0c856c0a8616b1':
  rtsp: Don't include the listen flag in the SDP demuxer flags

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-08 10:41:32 +02:00
Ben Avison
5afe1d2791 avio: Add const qualifiers to ffio_read_indirect
This provides at least some protection against potential accidental
corruption of AVIO buffer workspace.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-08 11:09:00 +03:00
Rémi Denis-Courmont
51eb213d00 libavformat: use avpriv_open()
Signed-off-by: Anton Khirnov <anton@khirnov.net>
2013-08-07 21:22:03 +02:00
Michael Niedermayer
f3b7f47070 avformat/oggparsevorbis: fix leak of tt
Fixes CID1061059
Fixes fate
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-07 17:20:39 +02:00
Michael Niedermayer
d0a882ab1d avformat/oggparsevorbis: fix leak of ct
Fixes CID1061058
Fixes fate

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-07 17:18:19 +02:00
Michael Niedermayer
731f7eaaad ff_flac_parse_picture: assert that len is within the array
The check that gurantees this isnt recognized by coverity for
example

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-07 17:18:05 +02:00
Martin Storsjö
f4d371b973 rtsp: Don't include the listen flag in the SDP demuxer flags
It's only relevant for the RTSP demuxer. Similarly, the custom_io
flag is only present in the SDP demuxer options list.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-07 13:16:44 +03:00
Michael Niedermayer
e4eab2d9bd Merge remote-tracking branch 'qatar/master'
* qatar/master:
  deprecate AV_CODEC_ID_VOXWARE and introduce AV_CODEC_ID_METASOUND instead

Conflicts:
	libavcodec/avcodec.h
	libavcodec/codec_desc.c
	libavcodec/version.h

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-07 12:14:39 +02:00
Michael Niedermayer
6bf6d6ad49 Merge commit '62572435d4106098c090fb8f129a9090e41ff1eb'
* commit '62572435d4106098c090fb8f129a9090e41ff1eb':
  rtpenc_chain: Check for errors from ffio_fdopen and ffio_open_dyn_packet_buf

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-07 12:05:03 +02:00
Michael Niedermayer
5d08f8149c Merge commit 'f542dedf72091af8e6f32a12bd64289c58857c21'
* commit 'f542dedf72091af8e6f32a12bd64289c58857c21':
  rtspenc: Check the return value from ffio_open_dyn_packet_buf

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-07 11:52:05 +02:00
Kostya Shishkov
f544c58636 deprecate AV_CODEC_ID_VOXWARE and introduce AV_CODEC_ID_METASOUND instead
Voxware is the name of company, it has produced several audio codecs e.g.
MetaVoice family and MetaSound.
2013-08-07 10:56:18 +02:00
Stephen Hutchinson
9db353bc47 avisynth: Exit gracefully when trying to serve video from v2.5.8.
'Fixes' ticket #2526 insofar as it stops 2.5.8 from crashing and
tells the user to upgrade to 2.6 if they want to make video input
work. A real solution to #2526 would be to get video input from
2.5.8 to work right.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-07 10:38:48 +02:00
Stephen Hutchinson
f277d6bf42 avisynth: Cosmetics
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-07 10:37:19 +02:00
Martin Storsjö
62572435d4 rtpenc_chain: Check for errors from ffio_fdopen and ffio_open_dyn_packet_buf
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-07 11:37:13 +03:00
Martin Storsjö
f542dedf72 rtspenc: Check the return value from ffio_open_dyn_packet_buf
Also clear the AVIOContext handle after freeing, to avoid
possible dangling pointers if the later call fails.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-07 11:37:01 +03:00
Michael Niedermayer
caa7a49481 avformat/utils: fix memleak with nobuffer
Fixes Ticket2802

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-07 01:21:43 +02:00
Michael Niedermayer
9e10b2cfc9 avformat/spdifenc make const tables static const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 20:30:36 +02:00
Michael Niedermayer
ef71717901 avformat/smoothstreamingenc: Make const tables static const
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 20:30:12 +02:00
Michael Niedermayer
5b13778f93 mpegts: remove usage of MOD_UNLIKELY()
Its not needed and doing nothing is faster than doing a optimized MOD

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 19:56:20 +02:00
Michael Niedermayer
0a8f5eb23a Merge commit '255d9c570e117f0fcb8e51fa2c5996f3c4b2052b'
* commit '255d9c570e117f0fcb8e51fa2c5996f3c4b2052b':
  riff: Move demuxing code to a separate file.

Conflicts:
	configure
	libavformat/riff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 18:30:47 +02:00
Michael Niedermayer
508a5349da Merge commit '3dd5c95deef51d7fbf6f4458ba42d1335d2f1472'
* commit '3dd5c95deef51d7fbf6f4458ba42d1335d2f1472':
  riff: Move muxing code to a separate file

Conflicts:
	configure
	libavformat/riff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 18:08:30 +02:00
Michael Niedermayer
7565aaecb4 Merge commit 'fcc455ff2e11ed04603aead1984a92ac3a4be226'
* commit 'fcc455ff2e11ed04603aead1984a92ac3a4be226':
  avformat/dv: K&R formatting cosmetics

Conflicts:
	libavformat/dv.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 18:01:03 +02:00
Michael Niedermayer
89efaabc99 Merge commit 'abe5268c3328bf0e8fcfb7dc6e231b8920177c3a'
* commit 'abe5268c3328bf0e8fcfb7dc6e231b8920177c3a':
  tcp: Use a different log message and level if there's more addresses to try

Conflicts:
	libavformat/tcp.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 17:53:01 +02:00
Michael Niedermayer
287f7d0ae1 Merge commit '2a0ec47bd70ebb79e8b2d2f956feeb3a813df798'
* commit '2a0ec47bd70ebb79e8b2d2f956feeb3a813df798':
  unix: Convert from AVERROR to errno range before comparing error codes

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 17:24:50 +02:00
Michael Niedermayer
f5b2718c0a Merge commit '971cce7ebb48a58e72e4dc57b3008e2682bcf4e7'
* commit '971cce7ebb48a58e72e4dc57b3008e2682bcf4e7':
  riff.h: Remove stray extern declaration for non-existing symbol

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 16:41:44 +02:00
Michael Niedermayer
0df55e1ba8 Merge commit 'a22ae9f0c579793f411e2bd7a8db557091a3a4ae'
* commit 'a22ae9f0c579793f411e2bd7a8db557091a3a4ae':
  mpegts: Remove one 64-bit integer modulus operation per packet

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 16:23:32 +02:00
Michael Niedermayer
2539767206 Merge commit 'bb9378251a167ef0116f263912e57f715c1e02ac'
* commit 'bb9378251a167ef0116f263912e57f715c1e02ac':
  network: Use SOCK_CLOEXEC when available

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 15:40:05 +02:00
Michael Niedermayer
8d06ce7941 Merge commit '605387582bd35920b83a26dabbe1c0601f425621'
* commit '605387582bd35920b83a26dabbe1c0601f425621':
  lavf: Support unix sockets

Conflicts:
	configure

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 15:33:12 +02:00
Michael Niedermayer
5dd8ca7d1b Merge commit 'c84ea750cf765c9d8845fca5546eb0ae25b9c855'
* commit 'c84ea750cf765c9d8845fca5546eb0ae25b9c855':
  mpegts: Make discard_pid() faster for single-program streams

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-08-06 15:16:35 +02:00
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
Diego Biurrun
255d9c570e riff: Move demuxing code to a separate file. 2013-08-06 11:02:36 +02:00
Diego Biurrun
3dd5c95dee riff: Move muxing code to a separate file 2013-08-06 11:02:35 +02:00
Diego Biurrun
fcc455ff2e avformat/dv: K&R formatting cosmetics 2013-08-06 11:01:44 +02:00
Martin Storsjö
abe5268c33 tcp: Use a different log message and level if there's more addresses to try
This lowers the level of warnings printed if trying to connect
to a host name that provides both v6 and v4 addresses but the
service only is available on the v4 address (often occurring for
'localhost', with servers that aren't v6-aware).

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-06 10:39:39 +03:00
Martin Storsjö
2a0ec47bd7 unix: Convert from AVERROR to errno range before comparing error codes
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-08-06 10:38:14 +03:00