summaryrefslogtreecommitdiff
path: root/libavformat/apetag.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge commit '059a934806d61f7af9ab3fd9f74994b838ea5eba'Michael Niedermayer2015-07-271-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '059a934806d61f7af9ab3fd9f74994b838ea5eba': lavc: Consistently prefix input buffer defines Conflicts: doc/examples/decoding_encoding.c libavcodec/4xm.c libavcodec/aac_adtstoasc_bsf.c libavcodec/aacdec.c libavcodec/aacenc.c libavcodec/ac3dec.h libavcodec/asvenc.c libavcodec/avcodec.h libavcodec/avpacket.c libavcodec/dvdec.c libavcodec/ffv1enc.c libavcodec/g2meet.c libavcodec/gif.c libavcodec/h264.c libavcodec/h264_mp4toannexb_bsf.c libavcodec/huffyuvdec.c libavcodec/huffyuvenc.c libavcodec/jpeglsenc.c libavcodec/libxvid.c libavcodec/mdec.c libavcodec/motionpixels.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/noise_bsf.c libavcodec/nuv.c libavcodec/nvenc.c libavcodec/options.c libavcodec/parser.c libavcodec/pngenc.c libavcodec/proresenc_kostya.c libavcodec/qsvdec.c libavcodec/svq1enc.c libavcodec/tiffenc.c libavcodec/truemotion2.c libavcodec/utils.c libavcodec/utvideoenc.c libavcodec/vc1dec.c libavcodec/wmalosslessdec.c libavformat/adxdec.c libavformat/aiffdec.c libavformat/apc.c libavformat/apetag.c libavformat/avidec.c libavformat/bink.c libavformat/cafdec.c libavformat/flvdec.c libavformat/id3v2.c libavformat/isom.c libavformat/matroskadec.c libavformat/mov.c libavformat/mpc.c libavformat/mpc8.c libavformat/mpegts.c libavformat/mvi.c libavformat/mxfdec.c libavformat/mxg.c libavformat/nutdec.c libavformat/oggdec.c libavformat/oggparsecelt.c libavformat/oggparseflac.c libavformat/oggparseopus.c libavformat/oggparsespeex.c libavformat/omadec.c libavformat/rawdec.c libavformat/riffdec.c libavformat/rl2.c libavformat/rmdec.c libavformat/rtpdec_latm.c libavformat/rtpdec_mpeg4.c libavformat/rtpdec_qdm2.c libavformat/rtpdec_svq3.c libavformat/sierravmd.c libavformat/smacker.c libavformat/smush.c libavformat/spdifenc.c libavformat/takdec.c libavformat/tta.c libavformat/utils.c libavformat/vqf.c libavformat/westwood_vqa.c libavformat/xmv.c libavformat/xwma.c libavformat/yop.c Merged-by: Michael Niedermayer <michael@niedermayer.cc>
| * lavc: Consistently prefix input buffer definesVittorio Giovara2015-07-271-2/+2
| | | | | | | | Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
* | Merge commit 'e1a57cbb1c2752feb9315f748836dc44e58d2dc6'Michael Niedermayer2015-02-151-1/+1
|\ \ | |/ | | | | | | | | | | * commit 'e1a57cbb1c2752feb9315f748836dc44e58d2dc6': ape: Use the proper variable type Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * ape: Use the proper variable typeLuca Barbato2015-02-151-1/+1
| | | | | | | | | | | | | | Avoid an unsigned underflow. Bug-Id: 1041122 CC: libav-stable@libav.org
* | avformat/apetag: More completely check avio_get_str() return valueMichael Niedermayer2014-12-061-2/+6
| | | | | | | | | | | | | | | | This is not needed but its more proper to check the return value Fixes CID1041122 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | Merge commit 'c5560e72d0bb69f8a1ac9536570398f84388f396'Michael Niedermayer2014-09-171-2/+4
|\ \ | |/ | | | | | | | | | | * commit 'c5560e72d0bb69f8a1ac9536570398f84388f396': apetag: Fix APE tag size check Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * apetag: Fix APE tag size checkKaterina Barone-Adesi2014-09-171-2/+4
| | | | | | | | | | | | | | | | | | | | The size variable is (correctly) unsigned, but is passed to several functions which take signed parameters, such as avio_read, sometimes after having numbers added to it. So ensure that size remains within the bounds that these functions can handle. CC: libav-stable@libav.org Signed-off-by: Diego Biurrun <diego@biurrun.de>
* | Merge commit 'd92024f18fa3d69937cb2575f3a8bf973df02430'Michael Niedermayer2014-03-111-2/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'd92024f18fa3d69937cb2575f3a8bf973df02430': lavf: more correct printf format specifiers Conflicts: libavformat/asfdec.c libavformat/cafdec.c libavformat/dxa.c libavformat/framecrcenc.c libavformat/hnm.c libavformat/iff.c libavformat/mov.c libavformat/mxfdec.c libavformat/rmdec.c libavformat/rpl.c libavformat/smacker.c libavformat/xmv.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * lavf: more correct printf format specifiersDiego Biurrun2014-03-111-2/+4
| |
* | avformat/apetag: use ff_get_extradata()Michael Niedermayer2013-12-251-6/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avformat: use ff_alloc_extradata()Paul B Mahol2013-10-131-3/+2
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | apetag: do not require seekable outputPaul B Mahol2013-06-141-27/+31
| | | | | | | | | | | | Also don't write empty tags. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2013-06-051-1/+1
|\ \ | |/ | | | | | | | | | | * qatar/master: apetag: use int64_t for filesize Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * apetag: use int64_t for filesizeAnton Khirnov2013-06-041-1/+1
| | | | | | | | CC: libav-stable@libav.org
* | apetag: do not create invalid APE tagsPaul B Mahol2013-05-291-1/+13
| | | | | | | | | | | | APEv2 specifications forbids non-ascii keys. Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge commit '2d2d6a4883479403798f4ed46941d5b365823570'Michael Niedermayer2013-05-291-0/+56
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '2d2d6a4883479403798f4ed46941d5b365823570': lavf: add a raw WavPack muxer. apetag: add support for writing APE tags matroskaenc: support muxing WavPack Conflicts: libavformat/Makefile libavformat/allformats.c libavformat/apetag.h libavformat/version.h libavformat/wvenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * apetag: add support for writing APE tagsAnton Khirnov2013-05-281-0/+56
| | | | | | | | This will be useful in the WavPack muxer.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-11-221-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | * qatar/master: id3v2: fix reading unsynchronized frames. cdgraphics: fix incorrect vertical offset mask in cdg_scroll() apetag: fix error handling in ff_ape_parse_tag() Conflicts: libavformat/id3v2.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * apetag: fix error handling in ff_ape_parse_tag()Xi Wang2012-11-211-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following error handling is broken due to signedness. int file_size; uint32_t tag_bytes; int64_t tag_start; ... tag_start = file_size - tag_bytes - APE_TAG_FOOTER_BYTES; if (tag_start < 0) { ... } Note that tag_bytes is unsigned, which makes the right-hand side of `tag_start = ...' unsigned, too. The 32-bit unsigned value is then zero-extended to 64 bits. Therefore, tag_start must be non-negative, and the check (tag_start < 0) is always false, which breaks the error handling. This patch fixes the check. Signed-off-by: Xi Wang <xi.wang@gmail.com> Signed-off-by: Anton Khirnov <anton@khirnov.net>
* | Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85'Michael Niedermayer2012-08-071-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-071-2/+2
| |
| * apetag: change a forgotten return to return 0Anton Khirnov2012-07-311-1/+1
| |
* | apetag: return value when required.Nicolas George2012-08-011-1/+1
| | | | | | | | Should fix compilation on clang.
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-311-6/+15
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
| * wv,mpc8: don't return apetag data in packets.Anton Khirnov2012-07-311-6/+15
| |
* | lavf/apetag: move common stuff between writer and reader to single filePaul B Mahol2012-07-291-3/+1
| | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-07-021-9/+37
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: asfdec: read attached pictures. apetag: reindent apetag: export attached covers as video streams. apetag: fix the amount of data read from binary tags. apetag: make sure avio_get_str() doesn't read more than it should. mov: read itunes cover art. snow: remove VLA in mc_block() intfloat: Don't use designated initializers in the public headers snow: remove a VLA. doc: Remind devs to check return values, especially for malloc() et al MS ATC Screen (aka MSS3) decoder vf_yadif: move x86 init code to x86/yadif.c vf_gradfun: move x86 init code to x86/gradfun.c roqvideo: Remove a totally unused dspcontext smacker: remove some unused code dsicin: remove dead assignment aacdec: remove dead assignment rl2: remove dead assignment proresenc: make a variable local to the loop where it is used alsdec: remove dead assignments Conflicts: Changelog doc/developer.texi libavcodec/allcodecs.c libavcodec/avcodec.h libavcodec/version.h libavfilter/gradfun.h libavfilter/x86/gradfun.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * apetag: reindentAnton Khirnov2012-07-021-9/+9
| |
| * apetag: export attached covers as video streams.Anton Khirnov2012-07-021-1/+24
| |
| * apetag: fix the amount of data read from binary tags.Anton Khirnov2012-07-021-1/+6
| | | | | | | | Substract the filename size from the data size.
| * apetag: make sure avio_get_str() doesn't read more than it should.Anton Khirnov2012-07-021-1/+1
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-251-0/+4
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: docs: use -bsf:[vas] instead of -[vas]bsf. mpegaudiodec: Prevent premature clipping of mp3 input buffer. lavf: move the packet keyframe setting code. oggenc: free comment header for all codecs lcl: error out if uncompressed input buffer is smaller than framesize. mjpeg: abort decoding if packet is too large. golomb: use HAVE_BITS_REMAINING() macro to prevent infloop on EOF. get_bits: add HAVE_BITS_REMAINING macro. lavf/output-example: use new audio encoding API correctly. lavf/output-example: more proper usage of the new API. tiff: Prevent overreads in the type_sizes array. tiff: Make the TIFF_LONG and TIFF_SHORT types unsigned. apetag: do not leak memory if avio_read() fails apetag: propagate errors. SBR DSP x86: implement SSE sbr_hf_g_filt SBR DSP x86: implement SSE sbr_sum_square_sse SBR DSP: use intptr_t for the ixh parameter. Conflicts: doc/bitstream_filters.texi doc/examples/muxing.c doc/ffmpeg.texi libavcodec/golomb.h libavcodec/x86/Makefile libavformat/oggenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * apetag: do not leak memory if avio_read() failsPaul B Mahol2012-02-231-1/+3
| | | | | | | | | | Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * apetag: propagate errors.Ronald S. Bultje2012-02-231-0/+2
| | | | | | | | | | | | | | Fixes crashes if reading the tag value fails. Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2012-02-181-8/+27
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (22 commits) als: prevent infinite loop in zero_remaining(). cook: prevent div-by-zero if channels is zero. pamenc: switch to encode2(). svq1enc: switch to encode2(). dvenc: switch to encode2(). dpxenc: switch to encode2(). pngenc: switch to encode2(). v210enc: switch to encode2(). xwdenc: switch to encode2(). ttadec: use branchless unsigned-to-signed unfolding avcodec: add a Sun Rasterfile encoder sunrast: Move common defines to a new header file. cdxl: fix video decoding for some files cdxl: fix audio for some samples apetag: add proper support for binary tags ttadec: remove dead code swscale: make access to filter data conditional on filter type. swscale: update context offsets after removal of AlpMmxFilter. prores: initialise encoder and decoder parts only when needed swscale: make monowhite/black RGB-independent. ... Conflicts: Changelog libavcodec/alsdec.c libavcodec/dpxenc.c libavcodec/golomb.h libavcodec/pamenc.c libavcodec/pngenc.c libavformat/img2.c libswscale/output.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * apetag: add proper support for binary tagsPaul B Mahol2012-02-171-8/+27
| | | | | | | | | | | | | | export as attachment streams Signed-off-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Justin Ruggles <justin.ruggles@gmail.com>
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-06-091-1/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: crypto: Use av_freep instead of av_free lavf: don't try to free private options if priv_data is NULL. swscale: fix types of assembly arguments. swscale: move two macros that are only used once into caller. swscale: remove unused function. options: Add missing braces around struct initializer. mov: Remove leftover crufty debug statement with references to a local file. dvbsubdec: Fix compilation of debug code. Remove all uses of now deprecated metadata functions. Move metadata API from lavf to lavu. Conflicts: doc/APIchanges libavformat/aiffdec.c libavformat/asfdec.c libavformat/avformat.h libavformat/avidec.c libavformat/cafdec.c libavformat/matroskaenc.c libavformat/mov.c libavformat/mp3enc.c libavformat/wtv.c libavutil/avutil.h libavutil/internal.h libswscale/swscale.c libswscale/x86/swscale_template.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Remove all uses of now deprecated metadata functions.Anton Khirnov2011-06-081-1/+2
| |
* | Merge remote-tracking branch 'qatar/master'Michael Niedermayer2011-06-031-4/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * qatar/master: (25 commits) Replace custom DEBUG preprocessor trickery by the standard one. vorbis: Remove non-compiling debug statement. vorbis: Remove pointless DEBUG #ifdef around debug output macros. cook: Remove non-compiling debug output. Remove pointless #ifdefs around function declarations in a header. Replace #ifdef + av_log() combinations by av_dlog(). Replace custom debug output functions by av_dlog(). cook: Remove unused debug functions. Remove stray extra arguments from av_dlog() invocations. targa: fix big-endian build v4l2: remove one forgotten use of AVFormatParameters.pix_fmt. vfwcap: add a framerate private option. v4l2: add a framerate private option. libdc1394: add a framerate private option. fbdev: add a framerate private option. bktr: add a framerate private option. oma: check avio_read() return value nutdec: remove unused variable Remove unused variables swscale: allocate larger buffer to handle altivec overreads. ... Conflicts: ffmpeg.c libavcodec/dca.c libavcodec/dirac.c libavcodec/error_resilience.c libavcodec/h264.c libavcodec/mpeg12.c libavcodec/mpeg4videodec.c libavcodec/mpegvideo.c libavcodec/mpegvideo_enc.c libavcodec/pthread.c libavcodec/rv10.c libavcodec/s302m.c libavcodec/shorten.c libavcodec/truemotion2.c libavcodec/utils.c libavdevice/dv1394.c libavdevice/fbdev.c libavdevice/libdc1394.c libavdevice/v4l2.c libavformat/4xm.c libavformat/apetag.c libavformat/asfdec.c libavformat/avidec.c libavformat/mmf.c libavformat/mpeg.c libavformat/mpegenc.c libavformat/mpegts.c libavformat/oggdec.c libavformat/oggparseogm.c libavformat/rl2.c libavformat/rmdec.c libavformat/rpl.c libavformat/rtpdec_latm.c libavformat/sauce.c libavformat/sol.c libswscale/utils.c tests/ref/vsynth1/error tests/ref/vsynth2/error Merged-by: Michael Niedermayer <michaelni@gmx.at>
| * Replace custom DEBUG preprocessor trickery by the standard one.Diego Biurrun2011-06-031-2/+0
| |
| * Remove unused variablesMans Rullgard2011-06-021-2/+2
| |
| * Replace FFmpeg with Libav in licence headersMans Rullgard2011-03-191-4/+4
| | | | | | | | Signed-off-by: Mans Rullgard <mans@mansr.com>
| * avio: avio_ prefix for url_fsizeAnton Khirnov2011-03-071-1/+1
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * avio: avio_ prefix for url_fseekAnton Khirnov2011-03-011-2/+2
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * avio: avio_ prefixes for get_* functionsAnton Khirnov2011-02-211-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In the name of consistency: get_byte -> avio_r8 get_<type> -> avio_r<type> get_buffer -> avio_read get_partial_buffer will be made private later get_strz is left out becase I want to change it later to return something useful. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
| * avio: rename ByteIOContext to AVIOContext.Anton Khirnov2011-02-201-2/+2
| | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
* | Fix various unused variable warningsClément Bœsch2011-05-301-1/+1
| | | | | | | | Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
* | avio: avio_ prefix for url_fsizeAnton Khirnov2011-03-081-1/+1
| | | | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 76aa876e69cf78a40821e66dec0a1006e4eb23ec)
* | avio: avio_ prefix for url_fseekAnton Khirnov2011-03-031-2/+2
| | | | | | | | | | Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit 6b4aa5dac8f41aa452d0ce9a1bede9e59a303060)
* | avio: avio_ prefixes for get_* functionsAnton Khirnov2011-02-221-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the name of consistency: get_byte -> avio_r8 get_<type> -> avio_r<type> get_buffer -> avio_read get_partial_buffer will be made private later get_strz is left out becase I want to change it later to return something useful. Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com> (cherry picked from commit b7effd4e8338f6ed5bda630ad7ed0809bf458648)