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
3ccd1580
Commit
3ccd1580
authored
Sep 27, 2011
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avconv: add support for copying attachments.
parent
c7a63a52
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
4 deletions
+15
-4
avconv.c
avconv.c
+9
-0
cmdutils.c
cmdutils.c
+2
-1
avtools-common-opts.texi
doc/avtools-common-opts.texi
+4
-3
No files found.
avconv.c
View file @
3ccd1580
...
...
@@ -1991,6 +1991,7 @@ static int transcode_init(OutputFile *output_files,
codec
->
height
=
icodec
->
height
;
break
;
case
AVMEDIA_TYPE_DATA
:
case
AVMEDIA_TYPE_ATTACHMENT
:
break
;
default
:
abort
();
...
...
@@ -3160,6 +3161,13 @@ static OutputStream *new_data_stream(OptionsContext *o, AVFormatContext *oc)
return
ost
;
}
static
OutputStream
*
new_attachment_stream
(
OptionsContext
*
o
,
AVFormatContext
*
oc
)
{
OutputStream
*
ost
=
new_output_stream
(
o
,
oc
,
AVMEDIA_TYPE_ATTACHMENT
);
ost
->
st
->
stream_copy
=
1
;
return
ost
;
}
static
OutputStream
*
new_subtitle_stream
(
OptionsContext
*
o
,
AVFormatContext
*
oc
)
{
AVStream
*
st
;
...
...
@@ -3375,6 +3383,7 @@ static void opt_output_file(void *optctx, const char *filename)
case
AVMEDIA_TYPE_AUDIO
:
ost
=
new_audio_stream
(
o
,
oc
);
break
;
case
AVMEDIA_TYPE_SUBTITLE
:
ost
=
new_subtitle_stream
(
o
,
oc
);
break
;
case
AVMEDIA_TYPE_DATA
:
ost
=
new_data_stream
(
o
,
oc
);
break
;
case
AVMEDIA_TYPE_ATTACHMENT
:
ost
=
new_attachment_stream
(
o
,
oc
);
break
;
default
:
av_log
(
NULL
,
AV_LOG_FATAL
,
"Cannot map stream #%d.%d - unsupported type.
\n
"
,
map
->
file_index
,
map
->
stream_index
);
...
...
cmdutils.c
View file @
3ccd1580
...
...
@@ -858,7 +858,7 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
{
if
(
*
spec
<=
'9'
&&
*
spec
>=
'0'
)
/* opt:index */
return
strtol
(
spec
,
NULL
,
0
)
==
st
->
index
;
else
if
(
*
spec
==
'v'
||
*
spec
==
'a'
||
*
spec
==
's'
||
*
spec
==
'd'
)
{
/* opt:[vasd
] */
else
if
(
*
spec
==
'v'
||
*
spec
==
'a'
||
*
spec
==
's'
||
*
spec
==
'd'
||
*
spec
==
't'
)
{
/* opt:[vasdt
] */
enum
AVMediaType
type
;
switch
(
*
spec
++
)
{
...
...
@@ -866,6 +866,7 @@ int check_stream_specifier(AVFormatContext *s, AVStream *st, const char *spec)
case
'a'
:
type
=
AVMEDIA_TYPE_AUDIO
;
break
;
case
's'
:
type
=
AVMEDIA_TYPE_SUBTITLE
;
break
;
case
'd'
:
type
=
AVMEDIA_TYPE_DATA
;
break
;
case
't'
:
type
=
AVMEDIA_TYPE_ATTACHMENT
;
break
;
}
if
(
type
!=
st
->
codec
->
codec_type
)
return
0
;
...
...
doc/avtools-common-opts.texi
View file @
3ccd1580
...
...
@@ -33,9 +33,10 @@ Possible forms of stream specifiers are:
Matches the stream with this index. E.g. @code{-threads:1 4} would set the
thread count for the second stream to 4.
@item @var{stream_type}[:@var{stream_index}]
@var{stream_type} is one of: 'v' for video, 'a' for audio, 's' for subtitle and
'd' for data. If @var{stream_index} is given, then matches stream number
@var{stream_index} of this type. Otherwise matches all streams of this type.
@var{stream_type} is one of: 'v' for video, 'a' for audio, 's' for subtitle,
'd' for data and 't' for attachments. If @var{stream_index} is given, then
matches stream number @var{stream_index} of this type. Otherwise matches all
streams of this type.
@item @var{program_id}[:@var{stream_index}]
If @var{stream_index} is given, then matches stream number @var{stream_index} in
program with id @var{program_id}. Otherwise matches all streams in this program.
...
...
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