Ticket #62 (closed defect: fixed)
aiff flt regression
| Reported by: | ami_stuff | Owned by: | |
|---|---|---|---|
| Priority: | important | Component: | avformat |
| Version: | git-master | Keywords: | aif |
| Cc: | Blocked By: | ||
| Blocking: | Reproduced by developer: | yes | |
| Analyzed by developer: | no |
Description
found another regression
SVN-r20817 - ok
SVN-r20854 - bad
ffplay can't play the file as well
http://samples.mplayerhq.hu/AIFF/M1F1-float32C-AFsp.aif
C:\>ffmpeg -i M1F1-float32C-AFsp.aif out.wav
FFmpeg version git-N-29062-ga0f1747, Copyright (c) 2000-2011 the FFmpeg develope
rs
built on Apr 13 2011 00:01:52 with gcc 4.5.2
configuration: --arch=x86 --cross-prefix=i686-pc-mingw32- --target-os=mingw32
--prefix=/ffmpeg/builds/git-N-29062-ga0f1747-static --enable-memalign-hack --dis
able-shared --enable-static --enable-w32threads --disable-debug --enable-gpl --e
nable-version3 --enable-runtime-cpudetect --enable-zlib --enable-bzlib --enable-
avisynth --enable-postproc --enable-libmp3lame --enable-libx264 --enable-libvorb
is --enable-libtheora --enable-libspeex --enable-libopencore-amrnb --enable-libo
pencore-amrwb --enable-libxvid --enable-libgsm --enable-libvpx --disable-decoder
=libvpx --enable-librtmp --enable-libopenjpeg --enable-frei0r --enable-libxavs -
-cc='ccache i686-pc-mingw32-gcc'
libavutil 50. 40. 1 / 50. 40. 1
libavcodec 52.119. 0 / 52.119. 0
libavformat 52.106. 0 / 52.106. 0
libavdevice 52. 4. 0 / 52. 4. 0
libavfilter 1. 78. 0 / 1. 78. 0
libswscale 0. 13. 0 / 0. 13. 0
libpostproc 51. 2. 0 / 51. 2. 0
Input #0, aiff, from 'M1F1-float32C-AFsp.aif':
Metadata:
comment : AFspdate: 2003-01-30 03:28:38 UTC
Duration: 00:00:02.93, start: 0.000000, bitrate: 512 kb/s
Stream #0.0: Audio: pcm_f32be, 8000 Hz, 2 channels, flt, 512 kb/s
Incompatible sample format 'flt' for codec 'pcm_s16le', auto-selecting format 's
16'
[pcm_s16le @ 01cf7bc0] The requested thread algorithm is not supported with this
thread library.
Output #0, wav, to 'out.wav':
Metadata:
comment : AFspdate: 2003-01-30 03:28:38 UTC
encoder : Lavf52.106.0
Stream #0.0: Audio: pcm_s16le, 8000 Hz, 2 channels, s16, 256 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
size= 0kB time=10000000000.00 bitrate= 0.0kbits/s
video:0kB audio:0kB global headers:0kB muxing overhead inf%
C:\>ffmpeg -i M1F1-float32C-AFsp.aif out.wav
FFmpeg version SVN-r20817, Copyright (c) 2000-2009 Fabrice Bellard, et al.
built on Dec 13 2009 06:04:14 with gcc 4.2.4
configuration: --enable-memalign-hack --prefix=/mingw --cross-prefix=i686-ming
w32- --cc=ccache-i686-mingw32-gcc --target-os=mingw32 --arch=i686 --cpu=i686 --e
nable-avisynth --enable-gpl --enable-version3 --enable-zlib --enable-bzlib --ena
ble-libgsm --enable-libfaad --enable-pthreads --enable-libvorbis --enable-libthe
ora --enable-libspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid
--enable-libschroedinger --enable-libx264 --enable-libopencore_amrwb --enable-li
bopencore_amrnb
libavutil 50. 6. 0 / 50. 6. 0
libavcodec 52.43. 0 / 52.43. 0
libavformat 52.41. 0 / 52.41. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0. 7. 2 / 0. 7. 2
Input #0, aiff, from 'M1F1-float32C-AFsp.aif':
Duration: 00:00:02.93, start: 0.000000, bitrate: 512 kb/s
Stream #0.0: Audio: pcm_f32be, 8000 Hz, 2 channels, flt, 512 kb/s
Metadata
comment : AFspdate: 2003-01-30 03:28:38 UTC
Output #0, wav, to 'out.wav':
Stream #0.0: Audio: pcm_s16le, 8000 Hz, 2 channels, s16, 256 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
size= 92kB time=2.94 bitrate= 256.1kbits/s
video:0kB audio:92kB global headers:0kB muxing overhead 0.046822%
Change History
comment:1 Changed 2 years ago by cehoyos
- Priority changed from normal to important
- Status changed from new to open
- Version changed from unspecified to git
- Reproduced by developer set
comment:2 Changed 2 years ago by ami_stuff
Author: michael
Date: Sun Dec 13 21:27:29 2009
New Revision: 20836
Log:
Use AV_METADATA_DONT_STRDUP* / use av_malloced metadata instead of strduped
arrays of fixed length.
Code from ffmbc with changes to adapt to our metadata API.
Modified:
trunk/libavformat/aiffdec.c
trunk/libavformat/apetag.c
trunk/libavformat/asfdec.c
trunk/libavformat/avidec.c
trunk/libavformat/flvdec.c
trunk/libavformat/oggparsevorbis.c
trunk/libavformat/soxdec.c
trunk/libavformat/vqf.c
trunk/libavformat/wc3movie.c
Modified: trunk/libavformat/aiffdec.c
==============================================================================
--- trunk/libavformat/aiffdec.c Sun Dec 13 21:24:19 2009 (r20835)
+++ trunk/libavformat/aiffdec.c Sun Dec 13 21:27:29 2009 (r20836)
@@ -66,19 +66,20 @@ static int get_tag(ByteIOContext *pb, ui
/* Metadata string read */
static void get_meta(AVFormatContext *s, const char *key, int size)
{
- uint8_t str[1024];
- int res = get_buffer(s->pb, str, FFMIN(sizeof(str)-1, size));
+ uint8_t *str = av_malloc(size+1);
+ int res;
+
+ if (!str) {
+ url_fskip(s->pb, size);
+ return;
+ }
+
+ res = get_buffer(s->pb, str, size);
if (res < 0)
return;
str[res] = 0;
- if (size & 1)
- size++;
- size -= res;
- if (size)
- url_fskip(s->pb, size);
-
- av_metadata_set(&s->metadata, key, str);
+ av_metadata_set2(&s->metadata, key, str, AV_METADATA_DONT_STRDUP_VAL);
}
/* Returns the number of sound data frames or negative on error */
Note: See
TracTickets for help on using
tickets.


