1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-29 16:23:10 +02:00
Commit Graph

924 Commits

Author SHA1 Message Date
Paul B Mahol
a807c68253 avformat: use ff_alloc_extradata()
Signed-off-by: Paul B Mahol <onemda@gmail.com>
2013-10-13 20:13:38 +00:00
Michael Niedermayer
a7630e3755 Merge commit 'b698542ad83284fbb8c22404e3cafeb2dd739d38'
* commit 'b698542ad83284fbb8c22404e3cafeb2dd739d38':
  mov: Don't allocate arrays with av_malloc that will be realloced

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-05 10:50:47 +02:00
Martin Storsjö
b698542ad8 mov: Don't allocate arrays with av_malloc that will be realloced
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-10-05 00:00:43 +03:00
Michael Niedermayer
e41ea866fc avformat/mov: force parsing of headers if stts is absent
Fixes Ticket2991

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-04 17:47:26 +02:00
Michael Niedermayer
ebb8dd437b mov: fix trun / pseudo_stream_id handling
This fixes simple concatenated h264

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-10-02 19:59:10 +02:00
Michael Niedermayer
143a19f5c7 Merge commit 'c231987662194d009dd91bfc57c678e0e70ca161'
* commit 'c231987662194d009dd91bfc57c678e0e70ca161':
  mov: Make sure the read sample count is nonnegative

Conflicts:
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-30 00:32:01 +02:00
Martin Storsjö
c231987662 mov: Make sure the read sample count is nonnegative
This avoids setting a negative number of frames, ending up with a
negative average frame rate.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-29 20:00:45 +03:00
Martin Storsjö
d872fb0f7f lavf: Reset the entry count and allocation size variables on av_reallocp failures
When av_reallocp fails, the associated variables that keep track of
the number of elements in the array (and in some cases, the
separate number of allocated elements) need to be reset.

Not all of these might technically be needed, but it's better to
reset them if in doubt, to make sure variables don't end up
conflicting.

Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-26 23:14:03 +03:00
Michael Niedermayer
a5cbf1991c avformat/mov: reset extradata size when extradata gets deallocated due to realloc failure
This prevents the fields from becoming inconsistent

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-22 16:11:02 +02:00
Michael Niedermayer
20dfab33f5 Merge commit '5626f994f273af80fb100d4743b963304de9e05c'
* commit '5626f994f273af80fb100d4743b963304de9e05c':
  avformat: Use av_reallocp() where suitable

Conflicts:
	libavformat/avidec.c
	libavformat/avienc.c
	libavformat/aviobuf.c
	libavformat/oggparsevorbis.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-19 11:01:26 +02:00
Alexandra Khirnova
5626f994f2 avformat: Use av_reallocp() where suitable
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-09-18 18:28:38 +02:00
Michael Niedermayer
7f20440b4c Merge commit '7f8d41eb097e8d4223c9caf97dd332a2fdb29d52'
* commit '7f8d41eb097e8d4223c9caf97dd332a2fdb29d52':
  mov: Don't use a negative duration for setting other fields

Conflicts:
	libavformat/mov.c

See: 87d073eacc
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-17 16:04:41 +02:00
Martin Storsjö
7f8d41eb09 mov: Don't use a negative duration for setting other fields
Some files have the duration set to -1 in the mdhd atom, more
or less legitimately. (We produce such files ourselves, for the
initial duration in fragmented mp4 files.)

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-09-17 11:33:37 +03:00
Michael Niedermayer
cbe47b1e84 Merge commit 'f369b9356c4606cd4d713d60f7db5de119d901fa'
* commit 'f369b9356c4606cd4d713d60f7db5de119d901fa':
  avformat: Use av_reallocp_array() where suitable

Conflicts:
	libavformat/asfenc.c
	libavformat/gxfenc.c
	libavformat/mov.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-09-11 11:23:40 +02:00
Alexandra Khirnova
f369b9356c avformat: Use av_reallocp_array() where suitable
Signed-off-by: Diego Biurrun <diego@biurrun.de>
2013-09-10 12:38:32 +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
Luca Barbato
5b41eb91e0 mov: Parse tmcd extradata 2013-08-25 13:49:13 +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
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
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
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
13eed267f8 Merge commit '31931520df35a6f9606fe8293c8a39e2d1fabedf'
* commit '31931520df35a6f9606fe8293c8a39e2d1fabedf':
  mov: Do not allow updating the time scale after it has been set

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-16 00:12:24 +02:00
Michael Niedermayer
38b701a349 Merge commit '5b4eb243bce10a3e8345401a353749e0414c54ca'
* commit '5b4eb243bce10a3e8345401a353749e0414c54ca':
  mov: Seek back if overreading an individual atom

Conflicts:
	libavformat/mov.c
See: 6093960ae3
Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-16 00:02:39 +02:00
Martin Storsjö
31931520df mov: Do not allow updating the time scale after it has been set
The time scale is set in mdhd, and later validated in the
enclosing trak atom once all of its children have been parsed.

A loose mdhd atom outside of a trak atom could update the time
scale of the last stream without any validation.

Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-15 21:38:58 +03:00
Martin Storsjö
5b4eb243bc mov: Seek back if overreading an individual atom
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Cc: libav-stable@libav.org
Signed-off-by: Martin Storsjö <martin@martin.st>
2013-07-15 21:37:44 +03:00
Thierry Foucu
38ce775eea libavformat/mov.c: Skipped duplicated MOOV atom
This should fix ticket 1378
 If we have parsed a moov atom, and found another one, just skip it.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-12 02:41:34 +02:00
Carl Eugen Hoyos
9a1ec1f2f2 Force correct extradata for AVID AVCI50 in mov.
Fixes ticket #2106.

Reviewed-by: Kieran Kunhya
2013-07-09 11:43:33 +02:00
Alexandre Sicard
70b922f371 avformat/mov: read stream bitrates from isml manifest
This allows to read a live isml movie and segment it using the
smoothstreaming muxer, which requires the bitrates to be known for each stream.

Signed-off-by: Alexandre Sicard <alexandre.sicard@smartjog.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-08 17:36:45 +02:00
Michael Niedermayer
dc2a13aa80 avformat/mov: Fix duration of fragmented mov
Fixes Ticket2757

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-07-07 04:11:14 +02:00
Carl Eugen Hoyos
0915b531bc Rename "AVClass class" as "AVClass component_class".
The aix header math.h defines "extern int class()" for C.
2013-06-30 13:47:45 +02:00
Carl Eugen Hoyos
f91833210e Set block_align when reading QDM2 in mov.
Fixes ticket #2718.
2013-06-28 09:04:16 +02:00
Alexandre Sicard
b1d61eb7aa avformat/mov: ignore samples overflowing next_root_atom
This fixes #2657.
ISML movies produced by Microsoft Expression Encoder 4 seem to have invalid
sample entries in their trun/tfhd for data tracks. As a result, too much bytes
are read for these tracks to the point that next_root_atom can go out of
buffer, which makes the encoding fail if the input is not seekable.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-06-12 00:51:38 +02:00
Alexandre Sicard
8912029031 avformat/mov: compute dts_shift with trun cts
Some movies have negative composition time offsets in their trun, causing pts <
dts errors. This patch makes use of dts_shift to handle them.

Signed-off-by: Alexandre Sicard <alexandre.sicard@smartjog.com>
2013-06-07 16:30:27 +02:00
Michael Niedermayer
29e97cd6c3 avformat/mov: Try to detect and support files with invalid sample sizes
Fixes Ticket2605

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-30 00:32:36 +02:00
Michael Niedermayer
5292dac34c avformat/mov: Rename alt_sample_size so its name matches what it is
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-25 18:47:36 +02:00
Piotr Bandurski
7baef22fca mov: set block_align for MACE 3:1 and MACE 6:1
fixes remuxing of audio track from mov to aifc

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-18 16:26:50 +02:00
Michael Niedermayer
efc08e00cc Merge commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110'
* commit 'b3ea76624ad1baab0b6bcc13f3f856be2f958110':
  vf_aspect: use the name 's' for the pointer to the private context
  Remove commented-out debug #define cruft

Conflicts:
	libavcodec/4xm.c
	libavcodec/dvdsubdec.c
	libavcodec/ituh263dec.c
	libavcodec/mpeg12.c
	libavfilter/avfilter.c
	libavfilter/vf_aspect.c
	libavfilter/vf_fieldorder.c
	libavformat/rtmpproto.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-16 09:56:43 +02:00
Diego Biurrun
2832ea26f3 Remove commented-out debug #define cruft 2013-05-16 00:23:30 +02:00
Michael Niedermayer
f083b4c338 Merge commit 'e0f8be6413b6a8d334d6052e610af32935c310af'
* commit 'e0f8be6413b6a8d334d6052e610af32935c310af':
  avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate

Conflicts:
	libavformat/ac3dec.c
	libavformat/avformat.h
	libavformat/avs.c
	libavformat/m4vdec.c
	libavformat/mov.c
	libavformat/mp3dec.c
	libavformat/mpeg.c
	libavformat/mpegvideodec.c
	libavformat/psxstr.c
	libavformat/pva.c
	libavformat/utils.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
2013-05-05 12:31:03 +02:00