summaryrefslogtreecommitdiff
path: root/libavformat/mp3dec.c
Commit message (Collapse)AuthorAge
* avformat/mp3dec: avoid early EOF with concatenated gapless mp3swm42014-09-21
| | | | | | | | | | | | | | | | | | | | Consider a file created with something like: cat file1.mp3 file2.mp3 > result.mp3 Then if file2.mp3 has gapless information, result.mp3 would stop playing something in the middle. This happens because the gapless info directs the decoder to discard all samples after a certain position. To make matters worse, the gapless info of file2.mp3 will be used when playing the file1.mp3 part, because the gapless info is located at the end of the file. While handling concatenated gapless files correctly would be insane and a lot of effort (especially without scanning the whole file on opening), it's easy to prevent at least early EOF. Playback will happen to work, even if it's slightly broken. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mp3dec: fix gapless audio supportwm42014-09-20
| | | | | | | | | | | | The code already had skipping of initial padding, but discarding trailing frame padding was missing. This is somewhat questionable, because it will make the decoder discard any data after the declared file size in the LAME header. But note that skipping full frames at the end of the stream is required. Encoders actually create such files. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* avformat/mp3dec: Improve seeking frame sync codeMichael Niedermayer2014-09-10
| | | | | | Fixes Ticket3884 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Ignore xing number of frames if the file is larger than indicated.Carl Eugen Hoyos2014-07-24
| | | | Fixes ticket #3777.
* avformat/mp3dec: check the number of frames per buffer sizeMichael Niedermayer2014-05-12
| | | | | | Fixes misdetection of issue3327-libc-2.17.so Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* Merge commit '32d05934abc7427bb90380a4c1ab20a15fd7d821'Michael Niedermayer2014-04-18
|\ | | | | | | | | | | | | | | | | | | * commit '32d05934abc7427bb90380a4c1ab20a15fd7d821': mp3dec: decode more data from Info header Conflicts: libavformat/mp3dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mp3dec: decode more data from Info headerAlessandro Ghedini2014-04-17
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit 'fbd8e042107ec63e0ddf155588c59dcb76007641'Michael Niedermayer2014-04-17
|\| | | | | | | | | | | | | | | | | | | * commit 'fbd8e042107ec63e0ddf155588c59dcb76007641': mp3dec: move XING/Info and VBRI parsing into their own functions Conflicts: libavformat/mp3dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mp3dec: move XING/Info and VBRI parsing into their own functionsAlessandro Ghedini2014-04-17
| | | | | | | | Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '15c5a8d22d12d29a364ca2ab6438f1dee2fa08c7'Michael Niedermayer2014-03-24
|\| | | | | | | | | | | | | | | | | | | * commit '15c5a8d22d12d29a364ca2ab6438f1dee2fa08c7': mp3dec: export replaygain tags from ID3v2 Conflicts: Changelog Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mp3dec: export replaygain tags from ID3v2Anton Khirnov2014-03-24
| |
* | avformat/mp3dec: optimize mp3_seek() for dir < 0Michael Niedermayer2014-03-02
| | | | | | | | | | | | this minimizes the amount of protocol seeks and reading needed in that case Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mp3dec: fix start time in light of initial skip samplesMichael Niedermayer2014-01-05
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mp3dec: 4x faster probingMichael Niedermayer2013-11-09
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mp3dec: perform seek resync in the correct directionMichael Niedermayer2013-10-25
| | | | | | | | | | | | | | Fixes seeking to the last frame in CBR files Fixes Ticket2773 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c0779a67e85df856904ee6fab760c4233d4c2be5'Michael Niedermayer2013-09-12
|\| | | | | | | | | | | | | | | | | | | * commit 'c0779a67e85df856904ee6fab760c4233d4c2be5': mp3: add .mpa extension Conflicts: libavformat/mp3dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mp3: add .mpa extensionVittorio Giovara2013-09-12
| | | | | | | | Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | avformat/mp3dec: improve detection of mp3s with huge id3 tagsMichael Niedermayer2013-08-26
| | | | | | | | | | | | | | When a id3 tag is larger than the amount of space we will probe give it a score similar to what a .mp3 extension would have given it Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mp3dec: make const tables static constMichael Niedermayer2013-08-05
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mp3dec: detect CBR and use CBR axiom to seekMichael Niedermayer2013-07-08
| | | | | | | | | | | | | | This should also work reasonable with truncated and growing mp3s. Fixes Ticket2590 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mp3dec: read TOC even if not all needed information is availableMichael Niedermayer2013-07-07
| | | | | | | | | | | | This fixes hyothetical bugs with parsing of elements after the TOC Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mp3dec: read xing toc independant of usetoc, only skip filling ↵Michael Niedermayer2013-07-07
| | | | | | | | | | | | | | | | index if requested Fixes hypothetical parsing bug with -usetoc 0 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat/mp3dec: Add usetoc option to allow dlsabling the use of the xing TOCMichael Niedermayer2013-07-06
| | | | | | | | | | | | | | The toc is inexact and not using it can thus make sense. Using it is faster though, thus the opposite can similarly makes sense Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'e0f8be6413b6a8d334d6052e610af32935c310af'Michael Niedermayer2013-05-05
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e0f8be6413b6a8d334d6052e610af32935c310af': avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriate Conflicts: libavformat/ac3dec.c libavformat/avformat.h libavformat/avs.c libavformat/m4vdec.c libavformat/mov.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegvideodec.c libavformat/psxstr.c libavformat/pva.c libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * avformat: Add AVPROBE_SCORE_EXTENSION define and use where appropriateDiego Biurrun2013-05-04
| |
* | Merge commit '505642f18276aed03278ac91b1f334ea888eac6a'Michael Niedermayer2013-04-19
|\| | | | | | | | | | | | | | | | | | | * commit '505642f18276aed03278ac91b1f334ea888eac6a': mp3dec: fallback to generic seeking when a TOC is not present Conflicts: libavformat/mp3dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mp3dec: fallback to generic seeking when a TOC is not presentMichael Niedermayer2013-04-19
| | | | | | | | | | | | | | Fixes seeking without a Xing/Info header. CC: libav-stable@libav.org Signed-off-by: Anton Khirnov <anton@khirnov.net>
| * mp3dec: Fix VBR bit rate parsingAlexander Kojevnikov2013-03-08
| | | | | | | | | | | | | | | | | | | | | | | | When parsing the Xing/Info tag, don't set the bit rate if it's an Info tag. When parsing the stream, don't override the bit rate if it's already set, otherwise calculate the mean bit rate from parsed frames. This way, the bit rate will be set correctly both for CBR and VBR streams. CC:libav-stable@libav.org Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | mp3dec: Fix VBR bit rate parsingAlexander Kojevnikov2013-03-05
| | | | | | | | | | | | | | | | | | | | | | When parsing the Xing/Info tag, don't set the bit rate if it's an Info tag. When parsing the stream, don't override the bit rate if it's already set, otherwise calculate the mean bit rate from parsed frames. This way, the bit rate will be set correctly both for CBR and VBR streams. Signed-off-by: Alexander Kojevnikov <alexander@kojevnikov.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mp3_read_probe: make buffer related pointers constMichael Niedermayer2012-12-25
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mp3dec: remove unused variableMichael Niedermayer2012-10-29
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mp3demux: Rewrite xing TOC based seekingMichael Niedermayer2012-10-21
| | | | | | | | | | | | | | | | | | | | The libav code depends on mp3 startcodes only occuring at the start of frames. But there is nothing in mp3 that prevents them occuring elsewhere by chance. Thus the code would fail randomly, the new code searches for 3 consecutive valid frames. If this turns out to be still insufficient the number can be raised further, or additional checks added. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mp3dec: fix seeking without xing TOCMichael Niedermayer2012-09-20
| | | | | | | | | | | | fixes regression from the xing toc support Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-09-20
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mp3dec: read Xing frame TOC index mp3dec: use named constants for Xing header flags libx264: add support for nal-hrd, required for Blu-ray streams. mov: support random access point grouping matroskadec: properly support BlockDuration Conflicts: libavcodec/libx264.c libavformat/isom.h libavformat/matroskadec.c libavformat/mov.c libavformat/mp3dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mp3dec: read Xing frame TOC indexAnton Khirnov2012-09-19
| |
| * mp3dec: use named constants for Xing header flagsAnton Khirnov2012-09-19
| |
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-07
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '36ef5369ee9b336febc2c270f8718cec4476cb85': Replace all CODEC_ID_* with AV_CODEC_ID_* lavc: add AV prefix to codec ids. Conflicts: doc/APIchanges doc/examples/decoding_encoding.c doc/examples/muxing.c ffmpeg.c ffprobe.c ffserver.c libavcodec/8svx.c libavcodec/avcodec.h libavcodec/dnxhd_parser.c libavcodec/dvdsubdec.c libavcodec/error_resilience.c libavcodec/h263dec.c libavcodec/libvorbisenc.c libavcodec/mjpeg_parser.c libavcodec/mjpegenc.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pcm.c libavcodec/r210dec.c libavcodec/utils.c libavcodec/v210dec.c libavcodec/version.h libavdevice/alsa-audio-dec.c libavdevice/bktr.c libavdevice/v4l2.c libavformat/asfdec.c libavformat/asfenc.c libavformat/avformat.h libavformat/avidec.c libavformat/caf.c libavformat/electronicarts.c libavformat/flacdec.c libavformat/flvdec.c libavformat/flvenc.c libavformat/framecrcenc.c libavformat/img2.c libavformat/img2dec.c libavformat/img2enc.c libavformat/ipmovie.c libavformat/isom.c libavformat/matroska.c libavformat/matroskadec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/movenc.c libavformat/mp3dec.c libavformat/mpeg.c libavformat/mpegts.c libavformat/mxf.c libavformat/mxfdec.c libavformat/mxfenc.c libavformat/nsvdec.c libavformat/nut.c libavformat/oggenc.c libavformat/pmpdec.c libavformat/rawdec.c libavformat/rawenc.c libavformat/riff.c libavformat/sdp.c libavformat/utils.c libavformat/vocenc.c libavformat/wtv.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace all CODEC_ID_* with AV_CODEC_ID_*Anton Khirnov2012-08-07
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-31
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: mpc8: return more meaningful error codes. mpc: return more meaningful error codes. wv,mpc8: don't return apetag data in packets. rtmp: do not warn about receiving metadata packets x86: h264dsp: Adjust YASM #ifdefs x86: yadif: Mark mmxext optimizations as such h264: convert loop filter strength dsp function to yasm. Improve descriptiveness of a number of codec and container long names Conflicts: libavcodec/flvdec.c libavcodec/libopenjpegdec.c libavformat/apetag.c libavformat/mp3dec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Improve descriptiveness of a number of codec and container long namesDiego Biurrun2012-07-30
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-29
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (35 commits) h264_idct_10bit: port x86 assembly to cpuflags. x86inc: clip num_args to 7 on x86-32. x86inc: sync to latest version from x264. fft: rename "z" to "zc" to prevent name collision. wv: return meaningful error codes. wv: return AVERROR_EOF on EOF, not EIO. mp3dec: forward errors for av_get_packet(). mp3dec: remove a pointless local variable. mp3dec: remove commented out cruft. lavfi: bump minor to mark stabilizing the ABI. FATE: add tests for yadif. FATE: add a test for delogo video filter. FATE: add a test for amix audio filter. audiogen: allow specifying random seed as a commandline parameter. vc1dec: Override invalid macroblock quantizer vc1: avoid reading beyond the last line in vc1_draw_sprites() vc1dec: check that coded slice positions and interlacing match. vc1dec: Do not ignore ff_vc1_parse_frame_header_adv return value configure: Move parts that should not be user-selectable to CONFIG_EXTRA lavf: remove commented out cruft in avformat_find_stream_info() ... Conflicts: Makefile configure libavcodec/vc1dec.c libavcodec/x86/h264_deblock.asm libavcodec/x86/h264_deblock_10bit.asm libavcodec/x86/h264dsp_mmx.c libavfilter/version.h libavformat/mp3dec.c libavformat/utils.c libavformat/wv.c libavutil/x86/x86inc.asm Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * mp3dec: forward errors for av_get_packet().Anton Khirnov2012-07-28
| | | | | | | | | | | | | | Don't invent a bogus EIO error. The code now doesn't check for ret == 0, but that check is redundant, av_get_packet() never returns 0.
| * mp3dec: remove a pointless local variable.Anton Khirnov2012-07-28
| |
| * mp3dec: remove commented out cruft.Anton Khirnov2012-07-28
| |
| * mp3/ac3 probe: search for PES headers to prevent probing MPEG-PS as MP3.Ronald S. Bultje2012-05-30
| |
* | mp3dec: mark as AVSTREAM_PARSE_FULL_RAWMichael Niedermayer2012-07-26
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mp3enc: add lame tag with start padding infoMichael Niedermayer2012-07-14
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mp3dec: parse initial silence padding information from lame tagMichael Niedermayer2012-07-12
| | | | | | | | | | | | And pass the information on to the lavf core. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mp3demux: fix id3 discard codeMichael Niedermayer2012-05-08
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | mp3demux: fix off by 1 errorMichael Niedermayer2012-05-08
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>