Commit Graph

13469 Commits

Author SHA1 Message Date
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