diff options
author | Anton Khirnov <anton@khirnov.net> | 2011-09-27 10:37:22 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2011-09-27 15:26:36 +0200 |
commit | 3ccd15803bc1dd06cf2646ade92891dada5417ea (patch) | |
tree | 494a2b49b64cb3eff661b7aeaba17b40bac88ef6 /avconv.c | |
parent | c7a63a521b5c165405e3577751d649529d09f0c5 (diff) | |
download | ffmpeg-3ccd15803bc1dd06cf2646ade92891dada5417ea.tar.gz |
avconv: add support for copying attachments.
Diffstat (limited to 'avconv.c')
-rw-r--r-- | avconv.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -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); |