diff mbox

[FFmpeg-devel] mov: move stsd finalization to an appropriate place

Message ID 20161014115634.5008-1-h.leppkes@gmail.com
State Accepted
Commit 656feb641de3cd5b9cb4e33ffd3f0ad4664c36d2
Headers show

Commit Message

Hendrik Leppkes Oct. 14, 2016, 11:56 a.m. UTC
mov_finalize_stsd_codec parses stream information from the ALAC extradata,
so run it after the extradata processing is completed in mov_read_stsd.

Fixes playback of 96kHz ALAC streams muxed by qaac or the reference alac encoder.
---
 libavformat/mov.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Carl Eugen Hoyos Oct. 14, 2016, 1:21 p.m. UTC | #1
2016-10-14 13:56 GMT+02:00 Hendrik Leppkes <h.leppkes@gmail.com>:
> mov_finalize_stsd_codec parses stream information from the ALAC extradata,
> so run it after the extradata processing is completed in mov_read_stsd.

Please mention ticket #5826 if your patch fixes the issue.

Carl Eugen
Hendrik Leppkes Oct. 15, 2016, 9:19 a.m. UTC | #2
On Fri, Oct 14, 2016 at 3:21 PM, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
> 2016-10-14 13:56 GMT+02:00 Hendrik Leppkes <h.leppkes@gmail.com>:
>> mov_finalize_stsd_codec parses stream information from the ALAC extradata,
>> so run it after the extradata processing is completed in mov_read_stsd.
>
> Please mention ticket #5826 if your patch fixes the issue.
>

It probably should, it sounds like a similar issue.

If there are no further comments, I'll apply tomorrow. It just moves
this call down slightly, no real risk of breakage.

- Hendrik
Hendrik Leppkes Oct. 17, 2016, 10:50 a.m. UTC | #3
On Sat, Oct 15, 2016 at 11:19 AM, Hendrik Leppkes <h.leppkes@gmail.com> wrote:
> On Fri, Oct 14, 2016 at 3:21 PM, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
>> 2016-10-14 13:56 GMT+02:00 Hendrik Leppkes <h.leppkes@gmail.com>:
>>> mov_finalize_stsd_codec parses stream information from the ALAC extradata,
>>> so run it after the extradata processing is completed in mov_read_stsd.
>>
>> Please mention ticket #5826 if your patch fixes the issue.
>>
>
> It probably should, it sounds like a similar issue.
>
> If there are no further comments, I'll apply tomorrow. It just moves
> this call down slightly, no real risk of breakage.
>

Applied.
diff mbox

Patch

diff --git a/libavformat/mov.c b/libavformat/mov.c
index a15c8d1..5ede1ed 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -2288,7 +2288,7 @@  int ff_mov_read_stsd_entries(MOVContext *c, AVIOContext *pb, int entries)
     if (pb->eof_reached)
         return AVERROR_EOF;
 
-    return mov_finalize_stsd_codec(c, pb, st, sc);
+    return 0;
 }
 
 static int mov_read_stsd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
@@ -2340,7 +2340,7 @@  static int mov_read_stsd(MOVContext *c, AVIOContext *pb, MOVAtom atom)
         memcpy(st->codecpar->extradata, sc->extradata[0], sc->extradata_size[0]);
     }
 
-    return 0;
+    return mov_finalize_stsd_codec(c, pb, st, sc);
 fail:
     av_freep(&sc->extradata);
     av_freep(&sc->extradata_size);