[FFmpeg-devel] [PATCH]lavf/mov: Support alac extradata in wave atom v2
Michael Niedermayer
michael at niedermayer.cc
Wed Aug 5 14:39:38 CEST 2015
On Mon, Aug 03, 2015 at 11:16:12PM +0200, Carl Eugen Hoyos wrote:
> Hi!
>
> Attached patch fixes ticket #4747 and should not introduce any
> theoretical regressions.
>
> Please review, Carl Eugen
> mov.c | 22 ++++++++++++++++++++++
> 1 file changed, 22 insertions(+)
> ffe1a030382f6bc11a5a58ab3cd5e89f8a354529 patchalacwave2.diff
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index 154d2f8..f3cb71f 100644
> --- a/libavformat/mov.c
> +++ b/libavformat/mov.c
> @@ -1435,6 +1435,28 @@ static int mov_read_wave(MOVContext *c, AVIOContext *pb, MOVAtom atom)
> if (ret < 0)
> return ret;
> } else if (atom.size > 8) { /* to read frma, esds atoms */
> + if (st->codec->codec_id == AV_CODEC_ID_ALAC && atom.size >= 24) {
> + uint64_t buffer = avio_rb64(pb);
> + atom.size -= 8;
> + if ( (buffer & 0xFFFFFFFF) == MKBETAG('f','r','m','a')
> + && buffer >> 32 <= atom.size
> + && buffer >> 32 >= 8) {
> + avio_skip(pb, (buffer >> 32) - 8);
> + atom.size -= (buffer >> 32) - 8;
skiping the frma atom instead of passing it to mov_read_default()
(which might at some point in the future do somehing with it)
does not feel completely ideal
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Everything should be made as simple as possible, but not simpler.
-- Albert Einstein
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150805/52f1e898/attachment.sig>
More information about the ffmpeg-devel
mailing list