Ticket #13186: 015_mheg_avstream_codec.patch

File 015_mheg_avstream_codec.patch, 2.8 KB (added by Peter Bennett, 3 years ago)

Fix use of AVStream::codec for MHEG

  • mythtv/external/FFmpeg/libavcodec/avcodec.h

    diff --git a/mythtv/external/FFmpeg/libavcodec/avcodec.h b/mythtv/external/FFmpeg/libavcodec/avcodec.h
    index da68a39..d70c5bf 100644
    a b typedef struct AVCodecContext { 
    17221722    unsigned int stream_codec_tag;
    17231723#endif
    17241724
    1725 #if 1 || FF_API_SUB_ID
    1726     /**
    1727      * this field is unused by ffmpeg, but is used by MythTV for the DVB
    1728      * caption carousel
    1729      *
    1730      */
    1731     int sub_id;
    1732 #endif
    1733 
    17341725    void *priv_data;
    17351726
    17361727    /**
  • mythtv/external/FFmpeg/libavformat/avformat.h

    diff --git a/mythtv/external/FFmpeg/libavformat/avformat.h b/mythtv/external/FFmpeg/libavformat/avformat.h
    index f4a7f4c..6b37560 100644
    a b typedef struct AVStream { 
    10841084    int got_frame;
    10851085
    10861086    int component_tag; ///< Component tag given in PMT, for MythTV MHEG
     1087    int carousel_id;
     1088    int data_id;
    10871089    /* end mythtv addons */
    10881090
    10891091    /**
  • mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c

    diff --git a/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c b/mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c
    index 9af2f68..bf6c22f 100644
    a b static void mpegts_add_stream(MpegTSContext *ts, int id, pmt_entry_t* item, 
    20762076            }
    20772077
    20782078            st->component_tag = item->dvbci.component_tag;
    2079             st->codec->flags  = item->dvbci.data_id;
    2080             st->codec->sub_id = item->dvbci.carousel_id;
     2079            st->data_id  = item->dvbci.data_id;
     2080            st->carousel_id = item->dvbci.carousel_id;
    20812081
    20822082            ts->pmt_pids[ts->pid_cnt] = item->pid;
    20832083            ts->pid_cnt++;
    static void mpegts_add_stream(MpegTSContext *ts, int id, pmt_entry_t* item, 
    21402140                av_dict_set(&st->metadata, "language", item->dvbci.language, 0);
    21412141
    21422142            if (item->dvbci.sub_id && (item->codec_id == AV_CODEC_ID_DVB_SUBTITLE))
    2143                 st->codec->sub_id = item->dvbci.sub_id;
     2143                st->carousel_id = item->dvbci.sub_id;
    21442144
    21452145            st->component_tag = item->dvbci.component_tag;
    21462146
  • mythtv/libs/libmythtv/avformatdecoder.cpp

    diff --git a/mythtv/libs/libmythtv/avformatdecoder.cpp b/mythtv/libs/libmythtv/avformatdecoder.cpp
    index cb49123..53dbe44 100644
    a b void AvFormatDecoder::ProcessDSMCCPacket( 
    39823982    {
    39833983        QMutexLocker locker(avcodeclock);
    39843984        componentTag    = str->component_tag;
    3985         // DEPRECATED need to get rid of str->codec
    3986         dataBroadcastId = str->codec->flags;
    3987         carouselId      = (unsigned) str->codec->sub_id;
     3985        dataBroadcastId = str->data_id;
     3986        carouselId  = (unsigned) str->carousel_id;
    39883987    }
    39893988    while (length > 3)
    39903989    {