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
945a440d
Commit
945a440d
authored
Dec 11, 2013
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Force one stream for raw muxers.
Based on
eeb975f5
Fixes ticket #3217. Reviewed-by: Nicolas George
parent
7f39352a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
0 deletions
+29
-0
rawenc.c
libavformat/rawenc.c
+29
-0
No files found.
libavformat/rawenc.c
View file @
945a440d
...
...
@@ -29,6 +29,16 @@ int ff_raw_write_packet(AVFormatContext *s, AVPacket *pkt)
return
0
;
}
static
int
force_one_stream
(
AVFormatContext
*
s
)
{
if
(
s
->
nb_streams
!=
1
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"%s files have exactly one stream
\n
"
,
s
->
oformat
->
name
);
return
AVERROR
(
EINVAL
);
}
return
0
;
}
/* Note: Do not forget to add new entries to the Makefile as well. */
#if CONFIG_AC3_MUXER
...
...
@@ -39,6 +49,7 @@ AVOutputFormat ff_ac3_muxer = {
.
extensions
=
"ac3"
,
.
audio_codec
=
AV_CODEC_ID_AC3
,
.
video_codec
=
AV_CODEC_ID_NONE
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -51,6 +62,7 @@ AVOutputFormat ff_adx_muxer = {
.
extensions
=
"adx"
,
.
audio_codec
=
AV_CODEC_ID_ADPCM_ADX
,
.
video_codec
=
AV_CODEC_ID_NONE
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -63,6 +75,7 @@ AVOutputFormat ff_cavsvideo_muxer = {
.
extensions
=
"cavs"
,
.
audio_codec
=
AV_CODEC_ID_NONE
,
.
video_codec
=
AV_CODEC_ID_CAVS
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -72,6 +85,7 @@ AVOutputFormat ff_cavsvideo_muxer = {
AVOutputFormat
ff_data_muxer
=
{
.
name
=
"data"
,
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"raw data"
),
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -84,6 +98,7 @@ AVOutputFormat ff_dirac_muxer = {
.
extensions
=
"drc"
,
.
audio_codec
=
AV_CODEC_ID_NONE
,
.
video_codec
=
AV_CODEC_ID_DIRAC
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -96,6 +111,7 @@ AVOutputFormat ff_dnxhd_muxer = {
.
extensions
=
"dnxhd"
,
.
audio_codec
=
AV_CODEC_ID_NONE
,
.
video_codec
=
AV_CODEC_ID_DNXHD
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -109,6 +125,7 @@ AVOutputFormat ff_dts_muxer = {
.
extensions
=
"dts"
,
.
audio_codec
=
AV_CODEC_ID_DTS
,
.
video_codec
=
AV_CODEC_ID_NONE
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -122,6 +139,7 @@ AVOutputFormat ff_eac3_muxer = {
.
extensions
=
"eac3"
,
.
audio_codec
=
AV_CODEC_ID_EAC3
,
.
video_codec
=
AV_CODEC_ID_NONE
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -135,6 +153,7 @@ AVOutputFormat ff_g722_muxer = {
.
extensions
=
"g722"
,
.
audio_codec
=
AV_CODEC_ID_ADPCM_G722
,
.
video_codec
=
AV_CODEC_ID_NONE
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -148,6 +167,7 @@ AVOutputFormat ff_g723_1_muxer = {
.
extensions
=
"tco,rco"
,
.
audio_codec
=
AV_CODEC_ID_G723_1
,
.
video_codec
=
AV_CODEC_ID_NONE
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -161,6 +181,7 @@ AVOutputFormat ff_h261_muxer = {
.
extensions
=
"h261"
,
.
audio_codec
=
AV_CODEC_ID_NONE
,
.
video_codec
=
AV_CODEC_ID_H261
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -174,6 +195,7 @@ AVOutputFormat ff_h263_muxer = {
.
extensions
=
"h263"
,
.
audio_codec
=
AV_CODEC_ID_NONE
,
.
video_codec
=
AV_CODEC_ID_H263
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -186,6 +208,7 @@ AVOutputFormat ff_h264_muxer = {
.
extensions
=
"h264"
,
.
audio_codec
=
AV_CODEC_ID_NONE
,
.
video_codec
=
AV_CODEC_ID_H264
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -211,6 +234,7 @@ AVOutputFormat ff_mjpeg_muxer = {
.
extensions
=
"mjpg,mjpeg"
,
.
audio_codec
=
AV_CODEC_ID_NONE
,
.
video_codec
=
AV_CODEC_ID_MJPEG
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -223,6 +247,7 @@ AVOutputFormat ff_mlp_muxer = {
.
extensions
=
"mlp"
,
.
audio_codec
=
AV_CODEC_ID_MLP
,
.
video_codec
=
AV_CODEC_ID_NONE
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -236,6 +261,7 @@ AVOutputFormat ff_mpeg1video_muxer = {
.
extensions
=
"mpg,mpeg,m1v"
,
.
audio_codec
=
AV_CODEC_ID_NONE
,
.
video_codec
=
AV_CODEC_ID_MPEG1VIDEO
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -248,6 +274,7 @@ AVOutputFormat ff_mpeg2video_muxer = {
.
extensions
=
"m2v"
,
.
audio_codec
=
AV_CODEC_ID_NONE
,
.
video_codec
=
AV_CODEC_ID_MPEG2VIDEO
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -272,6 +299,7 @@ AVOutputFormat ff_truehd_muxer = {
.
extensions
=
"thd"
,
.
audio_codec
=
AV_CODEC_ID_TRUEHD
,
.
video_codec
=
AV_CODEC_ID_NONE
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
@@ -284,6 +312,7 @@ AVOutputFormat ff_vc1_muxer = {
.
extensions
=
"vc1"
,
.
audio_codec
=
AV_CODEC_ID_NONE
,
.
video_codec
=
AV_CODEC_ID_VC1
,
.
write_header
=
force_one_stream
,
.
write_packet
=
ff_raw_write_packet
,
.
flags
=
AVFMT_NOTIMESTAMPS
,
};
...
...
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