summaryrefslogtreecommitdiff
path: root/src/combined/ffmpeg/ff_audio_decoder.c
AgeCommit message (Collapse)Author
2014-12-29ff_audio_decoder: add AAC ADTS probing and parsing v2.Torsten Jager
Some MPEG-TS streams dont align ADTS to TS-PES, pad ADTS frames to (nearly) fixed bitrate, and/or wrongly flag all this as LATM. Now the probing is more safe against ambigous input. Somebody please test whether this still breaks real LATM.
2014-12-24Revert 12672:63e9924bea7d. This change breaks real LATM.Chris Rankin
2014-11-21ff_audio_decoder: add AAC ADTS probing and parsing.Torsten Jager
Some MPEG-TS streams dont align ADTS to TS-PES, pad ADTS frames to (nearly) fixed bitrate, and/or wrongly flag all this as LATM. Somebody please test whether this breaks real LATM.
2014-08-02Fix AVCodecContext/AVFrame freeing.Torsten Jager
2014-06-06Copyright year update by hg log.Torsten Jager
2014-04-19added constPetri Hintukainen
2013-11-23ff_audio_decoder: dont risk breaking the audio gain feature.Torsten Jager
Lavc v54,55 seems to ignore request_sample_fmt anyway, but that need not stay that way forever.
2013-10-04ff_audio_decoder: add ATRAC 3 support, and fix some COOK audio trouble.Torsten Jager
I dont wanna lose my early 2000's videoteque. Maybe this needs my upcoming demux_real audio fix for full functionality.
2013-09-13Copyright year update by hg log infoTorsten Jager
script execution time: 55"
2013-08-10ff_audio_decoder: fix multichannel playbackTorsten Jager
* Observe channel configuration immediately after av_decode_audio* (). Do not try to access nonexistant channels after a 5.1 -> 2.0 switch for example. * Add NULL plane pointer paranoia. * Assume generic channel layout when no detailled one provided. Needed for wma2. * Follow user speaker arrangement changes on the fly. * Defer opening audio out until we have something to play. * Do not reopen audio out with identical settings. This and the previous item should help avoiding waiting on some drivers. * Hard wire output to int16_t. Some of the code did assume that, and we are converting to that anyway. * Do not read sample format from bits_per_coded_sample. Decoders neither alter that field, nor do they force its value to their output. * Rename some vars for better readability.
2013-03-27Reenable MPEG4 audio with fix for failure case.Torsten Jager
Audio out was opened with bogus settings (1Hz != 0) which failed. This prevented a retry after first audio frame came in and corrected the settings (48k/6 channels). Once ao _is_ open successfully, everything works same as before, including further stream conf changes.
2013-02-21ffmpeg_audio_decoder: added gain control option for float -> int16 conversionTorsten Jager
2013-02-21ffmpeg_audio_decoder: support new av_decode_audio4 ()Torsten Jager
2012-08-29ff_audio_decoder: re-open audio output when codec params changePetri Hintukainen
2012-08-29ff_audio_decoder.c: get last audio frame from parserJose Alberto Reguero
2012-08-29ff_Audio_decoder: EAC3 header buffers are not usedJose Alberto Reguero
2012-08-29ff_audio_decoder: enable parser for EAC3Jose Alberto Reguero
2012-01-18Merge from 1.1.Darren Salt
--HG-- rename : include/xine.h.in => include/xine.h rename : src/xine-engine/xine_internal.h => include/xine/xine_internal.h rename : src/combined/ffmpeg/ffmpeg_encoder.c => src/dxr3/ffmpeg_encoder.c
2012-01-18Moved ffmpeg API version checks to single headerPetri Hintukainen
2011-12-10Merge from 1.1.Darren Salt
--HG-- rename : src/liba52/xine_a52_decoder.c => src/audio_dec/xine_a52_decoder.c rename : src/libspudvb/xine_spudvb_decoder.c => src/spu_dec/spudvb_decoder.c rename : src/libxinevdec/image.c => src/video_dec/image.c
2011-11-23Merge from 1.1Petri Hintukainen
2011-11-23Fix libavcodec version checks for AAC LATM/MPEG parser codeBrad Smith
--HG-- branch : point-release
2011-11-18Fixed building with internal ffmpegPetri Hintukainen
2011-11-11Merge from 1.1.Darren Salt
--HG-- rename : src/libfaad/xine_faad_decoder.c => src/audio_dec/xine_faad_decoder.c rename : src/libspudvb/xine_spudvb_decoder.c => src/spu_dec/spudvb_decoder.c
2011-11-02ff_audio_decoder: Use parser for AAC LATM and MPEG. Fixes streams with ↵Petri Hintukainen
multiple audio packets in single PES packet and audio packets splitted to multiple PES packets.
2011-11-02ff_audio_decoder: do not queue any data if opening audio output failsPetri Hintukainen
2011-11-02ff_audio_decoder: If codec parameters can't be read from first audio packet, ↵Petri Hintukainen
try next. Fixes detecting parameters when there are multiple audio packets in single PES packet.
2011-11-02ff_audio_decoder: open audio out after decoding the dataPetri Hintukainen
- Fixes detecting audio parameters when audio packet is splitted to multiple buffers - Simplifies the code (decode function is called only once for each audio frame)
2011-10-27ff_audio_decoder: splitted calling avcodec_decode_audio* to separate functionPetri Hintukainen
2011-10-01Merge from 1.1.Darren Salt
--HG-- rename : src/libdts/xine_dts_decoder.c => src/audio_dec/xine_dts_decoder.c rename : src/libmusepack/xine_musepack_decoder.c => src/audio_dec/xine_musepack_decoder.c
2011-09-26Merge from 1.1. (Needs some testing.)Darren Salt
--HG-- rename : src/xine-engine/buffer.h => include/xine/buffer.h
2011-09-27ff_audio_open_codec(): initialize codec if it hasn't been initialized.Petri Hintukainen
This makes HEADERS optional for codecs that don't require extradata. imported patch 10124.diff
2011-09-27Splitted ff_audio_open_codec() from ff_audio_decode_data()Petri Hintukainen
imported patch 10123.diff
2011-09-27Splitted ff_audio_init_codec() from ff_audio_handle_header_buffer()Petri Hintukainen
imported patch 10121.diff
2011-09-27Splitted ff_audio_handle_header_buffer() from ff_audio_decode_data()Petri Hintukainen
imported patch 10120.diff
2011-09-27ffmpeg audio: make sure decode_buffer is allocated only oncePetri Hintukainen
imported patch 10119.diff
2011-09-15ffmpeg audio: removed checks that are always true (context is allocated in init)Petri Hintukainen
imported patch 10116.diff
2011-09-15ffmpeg audio: make sure context is allocated only oncePetri Hintukainen
imported patch 10115.diff
2011-09-16Fixed "warning: cast from pointer to integer of different size"Petri Hintukainen
2011-09-16Simplify: check for BUF_FLAG_SPECIAL only once. Splitted special buffer ↵Petri Hintukainen
handling to separate function.
2011-08-23Merge from 1.1.Darren Salt
--HG-- rename : src/xine-engine/buffer.h => include/xine/buffer.h rename : src/libxineadec/xine_lpcm_decoder.c => src/audio_dec/xine_lpcm_decoder.c rename : src/libspuhdmv/xine_hdmv_decoder.c => src/spu_dec/spuhdmv_decoder.c
2011-08-13ffmpeg audio crash fix (sse2 alignment)Torsten Jager
Certain ffmpeg audio decoders use 32 bit float samples internally (wma, eac3, ...). They are then exported to the calling application as 16 bit integer. That conversion is done by faster sse2 code if your processor supports it. However, sse2 instructions require data buffers to be 16 byte aligned, or hit a segfault otherwise. Plain malloc() / realloc() ensures only 8 byte alignment, giving a 50% chance of a crash. FFmpeg internally uses aligned buffers a lot. It seems to be a good idea to do likewise for input buffers as well, even if current version does not strictly need it yet. Libavutil/av_realloc() has a bug that can break the alignment when enlarging an existing buffer. Thus I included a fixed version of it within ff_audio_decoder.c.
2011-09-10Not every audio packet can be used to determine the sample rate and number ofChris Rankin
audio channels. So we must keep discarding packets that cannot be used to initialise the codec until we receive one that can be.
2011-09-10Pad end of audio data buffer with zeros, as instructed by the API documentation.Chris Rankin
2011-09-10Use xine's fast memcpy function instead of standard library one.Chris Rankin
2011-09-10Optimise flags usage.Chris Rankin
2011-05-17Fix build with very recent copies of FFmpegBrad Smith
This is a backport of the 1.2 code that was commited to utilize the new API provided by FFmpeg for awhile now but this is especially important because the old API has been eliminated all together from said copies of FFmpeg.
2011-05-16Fix up "pp" post-proc plugin and A/V decoding for ffmpeg 0.7.Darren Salt
2010-03-24Merge from 1.1.Darren Salt
--HG-- rename : doc/hackersguide/internals.sgml => doc/hackersguide/internals.docbook rename : doc/hackersguide/library.sgml => doc/hackersguide/library.docbook rename : include/xine.h.in => include/xine.h rename : src/xine-engine/buffer.h => include/xine/buffer.h rename : src/demuxers/demux_ogg.c => src/combined/xine_ogg_demuxer.c
2010-03-23Fixed using uninitialized decode_buffer_sizePetri Hintukainen