[FFmpeg-devel] [PATCH] mov hacks: Fix ulaw-in-mov sample.

Michael Niedermayer michaelni at gmx.at
Sun Mar 25 19:29:40 CEST 2012


On Sun, Mar 25, 2012 at 02:06:39PM +0200, Reimar Döffinger wrote:
> This patch fixes the sample from trac issue #522.
> One issue is that the size of the trak elements is coded
> too large, so that the next trak element would be parsed
> as part of the first and truncated incorrectly.
> The second issue is that the mov demuxer insists on using its
> calculated sample_size (which is nonsense) instead of the one
> encoded in the track.
> The old raw audio code should be using the value in stsz, because
> the size of a single sample never makes sense for the size of
> a full audio packet, whereas the new code will multiply the
> sample size by the chunk size, so it should use the calculated value.
> 
> Signed-off-by: Reimar Döffinger <Reimar.Doeffinger at gmx.de>
> ---
>  libavformat/isom.h |    1 +
>  libavformat/mov.c  |   13 ++++++++++++-
>  2 files changed, 13 insertions(+), 1 deletions(-)
> 
> diff --git a/libavformat/isom.h b/libavformat/isom.h
> index cd70c03..2d58443 100644
> --- a/libavformat/isom.h
> +++ b/libavformat/isom.h
> @@ -104,6 +104,7 @@ typedef struct MOVStreamContext {
>      int ctts_index;
>      int ctts_sample;
>      unsigned int sample_size;
> +    unsigned int alt_sample_size;

please document the exact meaning of the new field

patch LGTM in absence of other reviewers

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct awnser.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120325/7ca7fa1f/attachment.asc>


More information about the ffmpeg-devel mailing list