From 50059bde77674977d9134f3c1151a63cb7a2391c Mon Sep 17 00:00:00 2001 From: Reimar Döffinger Date: Sun, 25 Mar 2012 14:13:23 +0200 Subject: MOV: Fix old-style muxed raw-audio data. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch fixes the sample from trac issue #522. The issue is that the mov demuxer insists on using its calculated sample_size (which is nonsense for old-style tracks) 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 --- libavformat/isom.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libavformat/isom.h') diff --git a/libavformat/isom.h b/libavformat/isom.h index cd70c0305a..f5d03b20eb 100644 --- a/libavformat/isom.h +++ b/libavformat/isom.h @@ -103,7 +103,8 @@ typedef struct MOVStreamContext { unsigned *stps_data; ///< partial sync sample for mpeg-2 open gop int ctts_index; int ctts_sample; - unsigned int sample_size; + unsigned int sample_size; ///< may contain value calculated from stsd or value from stsz atom + unsigned int alt_sample_size; ///< always contains sample size from stsz atom unsigned int sample_count; int *sample_sizes; unsigned int keyframe_count; -- cgit v1.2.3