Revision 27ad7d3a ffmpeg.c

View differences:

ffmpeg.c
162 162
static int subtitle_disable = 0;
163 163
static char *subtitle_codec_name = NULL;
164 164
static char *subtitle_language = NULL;
165
static int subtitle_codec_tag = 0;
165 166

  
166 167
static float mux_preload= 0.5;
167 168
static float mux_max_delay= 0.7;
......
2681 2682
    opt_codec(&subtitle_stream_copy, &subtitle_codec_name, CODEC_TYPE_SUBTITLE, arg);
2682 2683
}
2683 2684

  
2685
static void opt_subtitle_tag(const char *arg)
2686
{
2687
    char *tail;
2688
    subtitle_codec_tag= strtol(arg, &tail, 0);
2689

  
2690
    if(!tail || *tail)
2691
        subtitle_codec_tag= arg[0] + (arg[1]<<8) + (arg[2]<<16) + (arg[3]<<24);
2692
}
2693

  
2684 2694
static void opt_map(const char *arg)
2685 2695
{
2686 2696
    AVStreamMap *m;
......
3222 3232

  
3223 3233
    subtitle_enc = st->codec;
3224 3234
    subtitle_enc->codec_type = CODEC_TYPE_SUBTITLE;
3235

  
3236
    if(subtitle_codec_tag)
3237
        subtitle_enc->codec_tag= subtitle_codec_tag;
3238

  
3225 3239
    if (subtitle_stream_copy) {
3226 3240
        st->stream_copy = 1;
3227 3241
    } else {
......
3867 3881
    { "scodec", HAS_ARG | OPT_SUBTITLE, {(void*)opt_subtitle_codec}, "force subtitle codec ('copy' to copy stream)", "codec" },
3868 3882
    { "newsubtitle", OPT_SUBTITLE, {(void*)opt_new_subtitle_stream}, "add a new subtitle stream to the current output stream" },
3869 3883
    { "slang", HAS_ARG | OPT_STRING | OPT_SUBTITLE, {(void *)&subtitle_language}, "set the ISO 639 language code (3 letters) of the current subtitle stream" , "code" },
3884
    { "stag", HAS_ARG | OPT_EXPERT | OPT_SUBTITLE, {(void*)opt_subtitle_tag}, "force subtitle tag/fourcc", "fourcc/tag" },
3870 3885

  
3871 3886
    /* grab options */
3872 3887
    { "vc", HAS_ARG | OPT_EXPERT | OPT_VIDEO | OPT_GRAB, {(void*)opt_video_channel}, "set video grab channel (DV1394 only)", "channel" },

Also available in: Unified diff