[FFmpeg-devel] [PATCH] recover from truncated aiff
Michael Niedermayer
michaelni
Wed Nov 26 12:00:50 CET 2008
On Wed, Nov 26, 2008 at 10:46:53AM +0200, Maksym Veremeyenko wrote:
> Baptiste Coudurier ???????(??):
> [...]
>>> Question: if wav file contains a MP2 data, does st->codec->block_align
>>> will be configured? If yes, does it code has a sense in
>>> libavformat/wav.c:
>> I'd say, if block_align is set, respect it.
> I checked for MP3 data in wav: block_align=1
>
> so please have a look on attached patch.
[...]
> @@ -233,7 +228,11 @@
>
> /* note: we need to modify the packet size here to handle the last
> packet */
> - pkt->size = ret;
> + if((st->codec->block_align > 1) && (ret % st->codec->block_align)) {
> + pkt->size -= pkt->size % st->codec->block_align;
> + av_log(s, AV_LOG_WARNING, "truncated packet detected, dropped %d bytes\n", ret - pkt->size);
> + }
> +
> return ret;
iam against this patch, its not the job of the wav demuxer to truncate its
data
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081126/d98aec6b/attachment.pgp>
More information about the ffmpeg-devel
mailing list