Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
744e4429
Commit
744e4429
authored
Sep 16, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mp3enc: merge mp2/mp3_write_trailer
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
197bbcf4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
21 deletions
+3
-21
mp3enc.c
libavformat/mp3enc.c
+3
-21
No files found.
libavformat/mp3enc.c
View file @
744e4429
...
...
@@ -341,7 +341,7 @@ static void mp3_update_xing(AVFormatContext *s)
avio_seek
(
s
->
pb
,
0
,
SEEK_END
);
}
static
int
mp
2
_write_trailer
(
struct
AVFormatContext
*
s
)
static
int
mp
3
_write_trailer
(
struct
AVFormatContext
*
s
)
{
uint8_t
buf
[
ID3v1_TAG_SIZE
];
MP3Context
*
mp3
=
s
->
priv_data
;
...
...
@@ -357,12 +357,8 @@ static int mp2_write_trailer(struct AVFormatContext *s)
avio_write
(
s
->
pb
,
buf
,
ID3v1_TAG_SIZE
);
}
/* write number of frames */
if
(
mp3
->
xing_offset
)
{
avio_seek
(
s
->
pb
,
mp3
->
xing_offset
+
8
,
SEEK_SET
);
avio_wb32
(
s
->
pb
,
s
->
streams
[
mp3
->
audio_stream_idx
]
->
nb_frames
);
avio_seek
(
s
->
pb
,
0
,
SEEK_END
);
}
if
(
mp3
->
xing_offset
)
mp3_update_xing
(
s
);
return
0
;
}
...
...
@@ -498,20 +494,6 @@ static int mp3_write_header(struct AVFormatContext *s)
return
0
;
}
static
int
mp3_write_trailer
(
AVFormatContext
*
s
)
{
MP3Context
*
mp3
=
s
->
priv_data
;
int
ret
=
mp2_write_trailer
(
s
);
if
(
ret
<
0
)
return
ret
;
if
(
mp3
->
xing_offset
)
mp3_update_xing
(
s
);
return
0
;
}
AVOutputFormat
ff_mp3_muxer
=
{
.
name
=
"mp3"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"MP3 (MPEG audio layer 3)"
),
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment