On 22 April 2014 18:20, Luca Barbato <[email protected]> wrote: > On 19/04/14 00:30, Ben Ockmore wrote: > > Hi everyone, > > > > My first post to this list, after a day of reading through > > documentation and examples and getting nowhere with a little problem > > I've encountered. > > > > Yesterday, I moved from Ubuntu 13.10 to Ubuntu 14.04, and recompiled > > a program I'd written using libav. When testing, I found that my code > > which previously worked with the Ubuntu 13.10 version oflibav (8.10, > > libavcodec53/libavformat53?) no longer works with the Ubuntu 14.04 > > version of libav (9.11, libavcodec54/libavformat54). > > > > Several error messages are output: > > [flac @ 0x1042fc0] invalid sync code > > [flac @ 0x1042fc0] invalid frame header > > [flac @ 0x1042fc0] decode_frame() failed > > > > I've tested this on 6 different FLACs, and seem to get the same > > problem each time. However, playing with avplay or running through > > "avconv -i test.flac -f f32le - > /dev/null" seems to work fine, and > > no errors are displayed. > > > > I'm guessing that something must've changed between those versions > > which means that I now need to modify my code to make it work properly > > with the latest version. However, I can't work out what. If anyone > > could take a look at a minimal code sample I've written to show the > > problem, and offer any suggestions, I'd greatly appreciate it. > > > > Minimal application + output here: > > > > http://pastebin.com/nJHm0pHC > > > > I quickly tested on a flac file fetched and your example seems working, > could you please provide me the example having the issue? > > lu > > _______________________________________________ > libav-api mailing list > [email protected] > https://lists.libav.org/mailman/listinfo/libav-api >
Based on a suspicion I had, I looked into ways of removing the metadata from the FLAC file. I've found that the problem seems to be occur when the FLAC file contains a picture in one of its metadata blocks. I've tested with this file: https://mutagen.googlecode.com/hg/tests/data/silence-44-s.flac And found that the problem happens with that. However, after doing "metaflac silence-44-s.flac --remove #4" (which removes the picture block), the FLAC file is read with no errors. Another (possibly unrelated) issue I've found is this: "[flac @ 0x1d02160] dropping low score 19 frame header from offset 1255 to 12357" Which happens for a particular FLAC file I've tested. This FLAC file tests fine with "flac --test", but my program seems to miss the majority of the audio in the file. Neither of these errors happened with libav 0.8. Besides moving from libav 0.8 to libav 9, the gcc package has also been changed in Ubuntu 14.04 from gcc-4:4.8.1 to gcc-4:4.8.2 (although this is only a minor version upgrade, and the fact that I'm getting no errors in avconv suggests that it's not a compiler issue). Has something happened that might've broken some sort of frame detection within the flac decoder? Ben _______________________________________________ libav-api mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-api
