Revision cb2c971d libavformat/utils.c

View differences:

libavformat/utils.c
2206 2206
        if (codec && codec->capabilities & CODEC_CAP_CHANNEL_CONF)
2207 2207
            st->codec->channels = 0;
2208 2208

  
2209
        /* Ensure that subtitle_header is properly set. */
2210
        if (st->codec->codec_type == AVMEDIA_TYPE_SUBTITLE
2211
            && codec && !st->codec->codec)
2212
            avcodec_open(st->codec, codec);
2213

  
2209 2214
        //try to just open decoders, in case this is enough to get parameters
2210 2215
        if(!has_codec_parameters(st->codec)){
2211
            if (codec)
2216
            if (codec && !st->codec->codec)
2212 2217
                avcodec_open(st->codec, codec);
2213 2218
        }
2214 2219
    }
......
2471 2476
        av_metadata_free(&st->metadata);
2472 2477
        av_free(st->index_entries);
2473 2478
        av_free(st->codec->extradata);
2479
        av_free(st->codec->subtitle_header);
2474 2480
        av_free(st->codec);
2475 2481
#if FF_API_OLD_METADATA
2476 2482
        av_free(st->filename);

Also available in: Unified diff