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>
13 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>
13 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>
13 years ago
Anton Khirnov
36ef5369ee
Replace all CODEC_ID_* with AV_CODEC_ID_*
13 years ago
Diego Biurrun
0177b7d23a
Improve descriptiveness of a number of codec and container long names
13 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
Reimar Döffinger
bb3244dee2
Replace all usage of strcasecmp/strncasecmp
...
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.
Instead use our own implementations that always treat the data
as ASCII.
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Reimar Döffinger
96949dafcc
Replace all strcasecmp/strncasecmp usages.
...
All current usages of it are incompatible with localization.
For example strcasecmp("i", "I") != 0 is possible, but would
break many of the places where it is used.
Instead use our own implementations that always treat the data
as ASCII.
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Tobias Rapp
0f39fa0279
mp3enc: avoid truncating id3v1 tags by one byte
...
Avoid writing the trailing null-byte for id3v1 tags if length reaches max length.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Karcher
16ad77b357
Move id3v2 tag writing to a separate file.
...
Signed-off-by: Diego Biurrun <diego@biurrun.de>
13 years ago
Anton Khirnov
82ab61f901
lavc: use avpriv_ prefix for some mpegaudio symbols used in lavf.
...
Specifically, ff_mpa_freq_tab, ff_mpa_bitrate_tab, ff_mpa_decode_header,
ff_mpegaudio_decode_header.
13 years ago
Anton Khirnov
145f741e11
AVOptions: rename FF_OPT_TYPE_* => AV_OPT_TYPE_*
13 years ago
Carl Eugen Hoyos
262ab1c59a
Do not assume timestamps for mp2 format.
14 years ago
Diogo Franco
f1f298cd32
Do not write ID3v1 tags by default
...
ID3v1 are legacy tags with several limitations; furthermore
avconv/ffmpeg writes the tags in UTF-8 which probably has near-0
software support.
Add a -write_id3v1 option to be able to turn it on; disabled by default.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Anton Khirnov
dfc2c4d900
lavf: use designated initialisers for all (de)muxers.
...
It's more readable and less prone to breakage.
14 years ago
Anton Khirnov
bda168d2b0
mp3enc: write a xing frame containing number of frames in the file
14 years ago
Anton Khirnov
d2d67e424f
Remove all uses of now deprecated metadata functions.
14 years ago
Anton Khirnov
f0029cbcf6
lavf: use designated initializers for AVClasses.
14 years ago
Anton Khirnov
b66752790a
AVOptions: make default_val a union, as proposed in AVOption2.
...
This breaks API and ABI.
14 years ago
Reimar Döffinger
5ce33e6bc5
Move ifdef to avoid unused variable warnings.
14 years ago
Michael Niedermayer
c60d2be551
mp3enc:simplify
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
e1e8a8ded4
mp3enc:better variable name for the frames field file postion.
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
4382bc2ceb
mp3enc: drop nested structs
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago
Michael Niedermayer
f2a90c3b34
mp3enc:use FFMIN()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
14 years ago