[FFmpeg-devel] [PATCH] Make ffmpeg support generic data stream
Luca Barbato
lu_zero
Wed Feb 16 21:25:21 CET 2011
On 02/16/2011 08:37 PM, Michael Niedermayer wrote:
>> + if (oc->oformat->flags & AVFMT_GLOBALHEADER) {
>> + data_enc->flags |= CODEC_FLAG_GLOBAL_HEADER;
>> + avcodec_opts[AVMEDIA_TYPE_SUBTITLE]->flags |= CODEC_FLAG_GLOBAL_HEADER;
> ^^^^^^^^^^^^^^^^
> copy and paste error
Thanks for spotting them.
>> @@ -3727,28 +3785,37 @@ static void opt_output_file(const char *filename)
>> use_video = file_oformat->video_codec != CODEC_ID_NONE || video_stream_copy || video_codec_name;
>> use_audio = file_oformat->audio_codec != CODEC_ID_NONE || audio_stream_copy || audio_codec_name;
>> use_subtitle = file_oformat->subtitle_codec != CODEC_ID_NONE || subtitle_stream_copy || subtitle_codec_name;
>> + use_data = data_stream_copy || data_codec_name;
>
> a file_oformat->data_codec field should be added at some pointg
Once somebody will introduce a generic data codec (gps coordinates
translator?) it might be useful, I'll add a comment on this line.
>
> [...]
>> @@ -4306,6 +4375,8 @@ static const OptionDef options[] = {
>> { "vpre", OPT_FUNC2 | HAS_ARG | OPT_VIDEO | OPT_EXPERT, {(void*)opt_preset}, "set the video options to the indicated preset", "preset" },
>> { "spre", OPT_FUNC2 | HAS_ARG | OPT_SUBTITLE | OPT_EXPERT, {(void*)opt_preset}, "set the subtitle options to the indicated preset", "preset" },
>> { "fpre", OPT_FUNC2 | HAS_ARG | OPT_EXPERT, {(void*)opt_preset}, "set options from indicated preset file", "filename" },
>> + /* data codec support */
>> + { "dcodec", HAS_ARG | OPT_SUBTITLE, {(void*)opt_data_codec}, "force data codec ('copy' to copy stream)", "codec" },
> ^^^^^^^^^
> another copy and paste error
Indeed the subtitle codepath had been my example...
fixing now.
lu
--
Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero
More information about the ffmpeg-devel
mailing list