Ticket #2579: old_klv_data_stream.patch

File old_klv_data_stream.patch, 568 bytes (added by Matt Leotta, 13 years ago)

This patch provides one possible solution

  • libavformat/mpegts.c

    diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
    index 85b5146..0bebb13 100644
    a b static int mpegts_set_stream_info(AVStream *st, PESContext *pes,  
    692692        mpegts_find_stream_type(st, pes->stream_type, MISC_types);
    693693    if (st->codec->codec_id == AV_CODEC_ID_NONE){
    694694        st->codec->codec_id  = old_codec_id;
    695         st->codec->codec_type= old_codec_type;
     695        if (old_codec_type != AVMEDIA_TYPE_UNKNOWN)
     696            st->codec->codec_type= old_codec_type;
    696697    }
    697698
    698699    return 0;