Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
c22f2527
Commit
c22f2527
authored
Jan 29, 2011
by
Baptiste Coudurier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
In mov and flv muxer, check aac bitstream validity.
parent
77f6b4d5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
flvenc.c
libavformat/flvenc.c
+6
-0
movenc.c
libavformat/movenc.c
+4
-0
No files found.
libavformat/flvenc.c
View file @
c22f2527
...
...
@@ -18,6 +18,8 @@
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "libavutil/intreadwrite.h"
#include "avformat.h"
#include "flv.h"
#include "internal.h"
...
...
@@ -402,6 +404,10 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
}
if
(
!
flv
->
delay
&&
pkt
->
dts
<
0
)
flv
->
delay
=
-
pkt
->
dts
;
}
else
if
(
enc
->
codec_id
==
CODEC_ID_AAC
&&
pkt
->
size
>
2
&&
(
AV_RB16
(
pkt
->
data
)
&
0xfff0
)
==
0xfff0
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"malformated aac bitstream, use -absf aac_adtstoasc
\n
"
);
return
-
1
;
}
ts
=
pkt
->
dts
+
flv
->
delay
;
// add delay to force positive dts
...
...
libavformat/movenc.c
View file @
c22f2527
...
...
@@ -1993,6 +1993,10 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
/* from x264 or from bytestream h264 */
/* nal reformating needed */
size
=
ff_avc_parse_nal_units
(
pb
,
pkt
->
data
,
pkt
->
size
);
}
else
if
(
enc
->
codec_id
==
CODEC_ID_AAC
&&
pkt
->
size
>
2
&&
(
AV_RB16
(
pkt
->
data
)
&
0xfff0
)
==
0xfff0
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"malformated aac bitstream, use -absf aac_adtstoasc
\n
"
);
return
-
1
;
}
else
{
avio_write
(
pb
,
pkt
->
data
,
size
);
}
...
...
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