Ticket #647: patchdn.diff

File patchdn.diff, 1.5 KB (added by cehoyos, 7 years ago)
  • ffmpeg.c

    diff --git a/ffmpeg.c b/ffmpeg.c
    index 84302ef..a9daaab 100644
    a b static void add_input_streams(OptionsContext *o, AVFormatContext *ic) 
    32293229                st->discard= video_discard;
    32303230            break;
    32313231        case AVMEDIA_TYPE_DATA:
     3232            if (o->data_disable)
     3233                st->discard= AVDISCARD_ALL;
    32323234            break;
    32333235        case AVMEDIA_TYPE_SUBTITLE:
    32343236            if(!ist->dec)
    static void opt_output_file(void *optctx, const char *filename) 
    40464048                continue;
    40474049            if(o->   video_disable && ist->st->codec->codec_type == AVMEDIA_TYPE_VIDEO)
    40484050                continue;
     4051            if(o->    data_disable && ist->st->codec->codec_type == AVMEDIA_TYPE_DATA)
     4052                continue;
    40494053
    40504054            switch (ist->st->codec->codec_type) {
    40514055            case AVMEDIA_TYPE_VIDEO:    ost = new_video_stream(o, oc);    break;
    static const OptionDef options[] = { 
    47494753    { "fpre", HAS_ARG | OPT_EXPERT| OPT_FUNC2, {(void*)opt_preset}, "set options from indicated preset file", "filename" },
    47504754    /* data codec support */
    47514755    { "dcodec", HAS_ARG | OPT_DATA | OPT_FUNC2, {(void*)opt_data_codec}, "force data codec ('copy' to copy stream)", "codec" },
     4756    { "dn", OPT_BOOL | OPT_VIDEO | OPT_OFFSET, {.off = OFFSET(data_disable)}, "disable data" },
    47524757
    47534758    { "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {(void*)opt_default}, "generic catch all option", "" },
    47544759    { NULL, },