Justin Ruggles
1fdf18f4b7
mov: add support for reading and writing the 'chan' tag
...
This implements reading the tag in the demuxer and adds support for writing it
in the muxer. Some example channel layout tables for muxing are included for
ac3, aac, and alac, but they are not utilized yet.
13 years ago
Michael Niedermayer
e1ccc9216b
movdec: remove redundant size<=8 check.
...
Its checked a few lines below too.
The only difference is that empty atoms with size=0 will now get parsed too.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
7d90bc9f2a
movdec: Read extended 64bit size before the debug av_log() and only when there
...
was enough space to read the 32bit size.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Mihnea Balta
fef2da6a22
movdec: Fix bad computed size for atoms with size 0 in MOV files
...
The computed size doesn't contain the header size because it's already
skipped by incrementing total_size, but then it's skipped again in the
last line. The atom comes out 8 bytes short and the function
mov_read_chan() aborts the whole parsing process. I think the computed
size should be atom.size - total_size + 8.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
f0d0ae3b1e
mov: increase total_size only when it actually increases.
...
This is just cosmetic as the if() is always true.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
a448a5d1c4
Do not fail fatally if chan atom is too short.
13 years ago
Michael Niedermayer
b27ac355b7
movdec: Fix parsing of a very last empty atom of size 8.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Alex Converse
52401b82bd
mov: Don't av_malloc(0).
...
malloc() is allowed to return NULL when zero is the argument. This
causes us to think malloc has failed and return AVERROR(ENOMEM). In
addition OS X malloc() returns an unfreeable non-NULL pointer for size
zero when alignment is greater than 16.
13 years ago
Alex Converse
6d23d19729
mov: Allow empty stts atom.
...
Fixes regressions caused by 30c3d976
13 years ago
Carl Eugen Hoyos
8dcd2a41ec
Allow last mov chunk to have an arbitrary number of samples.
...
Fixes ticket #673 .
13 years ago
Anton Khirnov
c3f9ebf743
lavf: make av_set_pts_info private.
...
It's supposed to be called only from (de)muxers.
13 years ago
Alex Converse
028a2375e2
mov: Make format string match variable type.
13 years ago
Alex Converse
9f8c190bb0
mov: Remove some redundant and obsolete comments.
13 years ago
Carl Eugen Hoyos
d50122eafa
Do not try to read total disc or track number if data atom is too short.
...
Fixes ticket #659 .
13 years ago
Clément Bœsch
055cda8acc
Rename remaining get_byte to avio_r8.
13 years ago
Martin Storsjö
9d77a8faf9
avformat: Use avio_open2, pass the AVFormatContext interrupt_callback onwards
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Carl Eugen Hoyos
8a3f976498
Support decoding "m1v " mpeg1video in mov.
...
Fixes ticket #579 at least for ffplay.
13 years ago
Carl Eugen Hoyos
237f13290b
movdec: Set frame_size for AMR
...
Earlier, sc->samples_per_frame was used for setting the frame size,
but all files don't have that set properly. The frame size is a
known constant for these codecs.
If frame_size isn't set, the mov/3gp muxer refuses to mux it.
This fixes stream copy of audio from
https://roundup.libav.org/file1248/Video_With_AMR-NB_Audio.3gp
to another 3gp file (roundup issue 2468).
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Carl Eugen Hoyos
a487378ef5
Set frame_size for AMR_NB in mov.
...
This copies the behaviour of the amr demuxer.
13 years ago
Benjamin Larsson
69e7ad8dbc
mov: Avoid divide by zero in edit list dts handling
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
13 years ago
Hendrik Leppkes
b76bc01034
Implement parsing of the "HandlerName" from th MP4 HDLR atom.
...
This atom typically is used for a track title.
(cherry picked from commit a356137816b4ea20a892d1fb203b11dbfedbc543)
Reviewed-by: Baptiste Coudurier
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Yusuke Nakamura
05e417aa63
mov: Support empty first edit + normal second edit.
...
(cherry picked from commit df342c91e6cfceb2537c2d1b2442dd685381a0ca)
Reviewed-by: Baptiste Coudurier
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Carl Eugen Hoyos
9e8dff90ef
Revert "mov: do not misreport empty stts"
...
Fixes ticket #578 .
This reverts commit 30c3d976f1
.
13 years ago
Raivo Hool
b06df70755
mov: add support for hdvd and pgapmetadata atoms
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Raivo Hool
5da35d1cb3
mov: rename function _stik, some indentation cosmetics
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Raivo Hool
80951f5cf6
mov: rename function _int8 to remove ambiguity, some indentation cosmetics
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Raivo Hool
94395fbf8c
mov: parse the gnre atom
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Anton Khirnov
ab88b25f99
lavf: use avpriv_ prefix for some dv functions.
...
They are used in libavdevice.
13 years ago
Anton Khirnov
1fa395e471
lavf: use avpriv_ prefix for ff_new_chapter().
...
It's used in libavdevice.
13 years ago
Anton Khirnov
84ad31ff18
lavf: replace av_new_stream->avformat_new_stream part II.
...
Manual replacements are done in this commit.
In many cases, the id is some constant made up number (e.g. 0 for video
and 1 for audio), which is then not used in the demuxer for anything.
Those ids are removed.
13 years ago
Michael Niedermayer
be401448e5
mov: Raise ctts dts_shift threshold by 1
...
This fixes issue2246neu.mp4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Raivo Hool
f055635313
mov: add support for TV metadata atoms tves, tvsn and stik
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Alex Converse
7ad06beb2c
mov: 10l: Terminate string with 0 not '0'
13 years ago
Alex Converse
8fb22c3d47
mov: Prevent illegal writes when chapter titles are very short.
13 years ago
Luca Barbato
30c3d976f1
mov: do not misreport empty stts
...
Return -1 instead of ENOMEM if entries is 0.
Fixes a av_malloc(0) crash in macosx.
13 years ago
Luca Barbato
5a7ba58657
mov: cosmetics, fix for and if spacing
13 years ago
Raivo Hool
2804d32075
mov: read album_artist atom
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Raivo Hool
dff4177546
mov: fix disc/track numbers and totals
...
Signed-off-by: Anton Khirnov <anton@khirnov.net>
13 years ago
Tomas Härdin
e571305a71
mov: Only touch extradata in mov_read_extradata() if codec_id is what we expect
...
Extradata should only be parsed from the avss, fiel, jp2h and alac atoms for
AVS, MJPEG, Motion JPEG 2000 and ALAC respectively.
This also fixes the mov demuxer coming up with bogus extradata for some
AVC-Intra samples due to the presence of fiel atoms.
13 years ago
Carl Eugen Hoyos
d5d027682c
Use the parser for AC-3 in mov.
...
Fixes ticket #494 .
13 years ago
Anton Khirnov
609a2fa1fa
Remove some forgotten AVCodecContext.palctrl usage.
13 years ago
Michael Niedermayer
cadbe4ecd1
mov: Fix grayscale Cinepak in mov
...
Fixes Ticket165
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Baptiste Coudurier
f33be93b1b
mov: read tmcd tag and set timecode drop flag accordingly.
14 years ago
Alex Converse
ad6c7c1b52
mp4: Handle non-trivial ES Descriptors.
14 years ago
Thierry Foucu
1892052f8d
mov: Set negative Sample_duration in STTS to 1
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Thierry Foucu
73c0dd939d
mov: add clcp type track as Subtitle stream.
...
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
14 years ago
Anton Khirnov
dfc2c4d900
lavf: use designated initialisers for all (de)muxers.
...
It's more readable and less prone to breakage.
14 years ago
Mans Rullgard
0ebcdf5cda
Do not include mathematics.h in avutil.h
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Mans Rullgard
ee8aecd23a
Do not include intfloat_readwrite.h in avutil.h
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago
Mans Rullgard
add41decd9
Remove return statements following infinite loops without break
...
These statements cannot be reached and are thus not needed.
This removes a number of compiler warnings.
Signed-off-by: Mans Rullgard <mans@mansr.com>
14 years ago