Anton Khirnov
955aec3c7c
mpegaudiodecheader: check the header in avpriv_mpegaudio_decode_header
...
Almost all the places from which this function is called already check
the header manually and in the two that don't (the mp3 muxer) the check
should not cause any problems.
9 years ago
Clément Bœsch
43ecec0f03
avformat: use AV_OPT_TYPE_BOOL in a bunch of places
9 years ago
Luca Barbato
ce70f28a17
avpacket: Replace av_free_packet with av_packet_unref
...
`av_packet_unref` matches the AVFrame ref-counted API and can be used as
a drop in replacement.
Deprecate `av_free_packet`.
9 years ago
Florent Le Coz
2e0935965b
Drop the unofficial extension prefix for MPEG and MPEG-TS formats
...
As per the RFCs:
http://tools.ietf.org/html/rfc3555#page-38
http://tools.ietf.org/html/rfc3003
CC: libav-stable@libav.org
10 years ago
Benoit Fouet
dc351e1381
id3v2: prefer TDRC for date over TDRL.
...
TDRL is what we used as a replacement of TYER, and, according to
http://id3.org/id3v2.4.0-changes :
TYER - Year
This frame is replaced by the TDRC frame, 'Recording time'
[F:4.2.5].
So change TDRL usages to TDRC.
Fixes ticket #3694
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
2dbee1a393
avformat/mp3enc: Squeeze our mp3 encoder tag into the 9byte shortname instead of randomly truncating
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Anton Khirnov
ef363ebd59
mp3enc: write full LAME frame
...
Most importantly, it contains the encoder delay and replaygain info.
10 years ago
Michael Niedermayer
d58fa9482e
avformat/mp3enc: use initial_padding
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
James Almer
d3e9bee6f7
lavf/mp3enc: don't abort if audio packets can't be buffered
...
Instead skip the picture streams and flush the queued audio packets.
Should address ticket #3851 .
Signed-off-by: James Almer <jamrial@gmail.com>
10 years ago
Justin Ruggles
f2f2e7627f
Check mp3 header before calling avpriv_mpegaudio_decode_header().
...
As indicated in the function documentation, the header MUST be
checked prior to calling it because no consistency check is done
there.
CC:libav-stable@libav.org
11 years ago
Florent Le Coz
fdcb2873e1
Fix the mime types for MPEG and MPEG-TS formats
...
As per the RFCs:
http://tools.ietf.org/html/rfc3555#page-38
http://tools.ietf.org/html/rfc3003
11 years ago
Michael Niedermayer
fab50573bb
avformat/mp3enc: switch to AVFMT_FLAG_BITEXACT
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
eccec20397
avformat/mp3enc: drop redundant and uninitialized variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
617a1a98a6
mp3enc: Properly write bitrate value in XING header
...
Instead of using a fixed bitrate_idx, calculate a matching bitrate for
the XING header.
Using a fixed bitrate_idx causes tools such as file(1) and mediainfo(1)
to report wrong bitrate and bitrate mode when using CBR.
Bug-Id: https://bugs.debian.org/736088
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
11 years ago
Michael Niedermayer
d003a0cd2e
avformat/mp3enc: use av_copy_packet()
...
Fixes double free
Fixes Ticket3476
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
James Darnley
0de03fd6a1
lavf/id3v2enc: use metadata_header_padding
...
As with the change to flacenc this allows the user to control the amount
of padding they want added to the file.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
33018907bd
mp3enc: allow omitting the id3v2 header with -id3v2_version 0
11 years ago
Anton Khirnov
f9cc6883a4
mp3enc: add an option for disabling the Xing frame.
11 years ago
Michael Niedermayer
49515cb840
avformat: remove duplicate includes
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Vittorio Giovara
c0779a67e8
mp3: add .mpa extension
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
11 years ago
Anton Khirnov
1afddbe59e
avpacket: use AVBuffer to allow refcounting the packets.
...
This will allow us to avoid copying the packets in many cases.
This breaks ABI.
12 years ago
Clément Bœsch
2dd0da787c
lavf/mp3enc: make sure the header is valid before writing audio pkt.
...
An invalid header can lead avpriv_mpegaudio_decode_header() to overread
and/or div by zero.
12 years ago
Michael Niedermayer
cb65b32c97
mp3enc: remove unneeded null ptr check
...
Fixes: CID733746
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
d31098113f
mp3enc: fix signed C99 overflow
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
744e4429cf
mp3enc: merge mp2/mp3_write_trailer
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
197bbcf44c
mp3enc: move mp3_update_xing() down
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
7040c9fac2
mp3enc: write Xing TOC
...
Based on the code by:
Peter Belkner <pbelkner@snafu.de>,
Michael Niedermayer <michaelni@gmx.at>,
Clément Bœsch <clement.boesch@smartjog.com>,
Reimar Döffinger <Reimar.Doeffinger@gmx.de>, and
Tobias Rapp <t.rapp@noa-audio.com>
Alex Converse <alex.converse@gmail.com>
Signed-off-by: Anton Khirnov <anton@khirnov.net>
12 years ago
Clément Bœsch
ca8e39dd0d
mp3enc: support MPEG-2 and MPEG-2.5 in Xing header.
12 years ago
Reimar Döffinger
6365e4db79
mp3enc: downgrade some errors in writing Xing frame to warnings
...
Also clarify the meaning of the log message.
12 years ago
Carl Eugen Hoyos
407eeb3474
mp2 muxer: mark as AVFMT_NOTIMESTAMPS.
...
Signed-off-by: Alex Converse <alex.converse@gmail.com>
12 years ago
Martin Storsjö
e6153f173a
avopt: Store defaults for AV_OPT_TYPE_INT in the i64 union member
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Michael Niedermayer
370bb893d2
mp3enc: fix const correctness
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
bd6ece4609
mp3enc: fix CODEC_ID/CodecID that leaked in from older patch
...
Found-by: jamal <jamrial@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
7fd467f708
mp3/mp2: identify the video codecs as APIC through query_codec.
...
Fixes Ticket1408
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
12 years ago
Diego Biurrun
0177b7d23a
Improve descriptiveness of a number of codec and container long names
12 years ago
Michael Niedermayer
57d5a224ce
mp3enc: add lame tag with start padding info
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
ca297513f0
lavf/mp3enc: support MPEG-2 and MPEG-2.5 sample rates when writing Xing header.
13 years ago
Michael Niedermayer
f14f3bae6b
mp3enc: avoid ifdef
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Tobias Rapp
8da0a6cda1
mp3enc: Fix Xing tag identification string for CBR files
...
Fixes the Xing tag identification string to be "Info" for MP3 files with
constant bitrate. The previous "Xing" caused some decoders to recognize the
file as VBR.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Reimar Döffinger
4c53c66a21
mp3enc: clarify meaning of "Unsupported" messages.
...
They will only cause us to skip writing the Xing header,
not cause any serious breakage.
Related to trac issue #1027 .
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Martin Storsjö
20234a4bd7
cosmetics: Align muxer/demuxer declarations
...
Also add missing trailing commas, break long codec_tag lines and
add spaces in codec_tag declarations.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Anton Khirnov
2dfea12058
mp3enc: write attached pictures (APIC).
13 years ago
Anton Khirnov
c68148b1ea
mp3enc: move mp3_write_xing() further up in the file.
...
It will be need by new functions called from mp3_write_trailer().
13 years ago
Anton Khirnov
411225aabc
id3v2enc: split ff_id3v2_write().
...
This will allow writing the tag in several steps, needed for writing
attached pictures.
13 years ago
Michael Niedermayer
4dbdd3ec6f
mp3enc: fix "warning: best_bitrate_idx may be used uninitialized in this function"
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
e1a8164d62
mp3enc: fix playback with mp3 encoded files on some devices.
...
This partially reverts 1fea432b; header variable needs to keep its value
in case it triggers "if (needed <= c.frame_size)".
13 years ago
Paul B Mahol
73ba2c1e62
mp3enc: remove unused variable
13 years ago
Michael Niedermayer
40176fc314
mp3enc: Try to use a matching bitrate in the xing header.
...
Might Fix Ticket431
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
1fea432b7a
mp3enc: simplify mp3_write_xing()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago