Skip to content

Commit

Permalink
OK, that was the right idea, but the wrong way around.
Browse files Browse the repository at this point in the history
Rename the functions in the ffmpeg mpegts.c that collide with ours and where
we want ours to take precedence.  This was confusing the probe functionality
the other way around.  Also, disable mpegts-ffmpeg demuxer.  The code should
still be sucked in for wtv support though.
  • Loading branch information
Beirdo committed Apr 12, 2012
1 parent b9ec51e commit 340a68d
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion mythtv/external/FFmpeg/libavformat/allformats.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ void av_register_all(void)
REGISTER_MUXER (MPEG2VOB, mpeg2vob);
REGISTER_DEMUXER (MPEGPS, mpegps);
REGISTER_MUXER (MPEGTS, mpegts);
REGISTER_DEMUXER (MPEGTS, mpegts);
// REGISTER_DEMUXER (MPEGTS, mpegts);
REGISTER_DEMUXER (MPEGTS, mythtv_mpegts);
REGISTER_DEMUXER (MPEGTSRAW, mythtv_mpegtsraw);
REGISTER_DEMUXER (MPEGTSRAW, mpegtsraw);
Expand Down
14 changes: 7 additions & 7 deletions mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ typedef struct PESContext {
SLConfigDescr sl;
} PESContext;

extern AVInputFormat ff_mpegts_demuxer;
extern AVInputFormat ff_mythtv_mpegts_demuxer;

struct SectionContext {
int pid;
Expand Down Expand Up @@ -1478,7 +1478,7 @@ static void m4sl_cb(MpegTSFilter *filter, const uint8_t *section, int section_le
av_free(mp4_descr[i].dec_config_descr);
}

int ff_mythtv_parse_mpeg2_descriptor(AVFormatContext *fc, pmt_entry_t *item, int stream_type,
int ff_parse_mpeg2_descriptor(AVFormatContext *fc, pmt_entry_t *item, int stream_type,
const uint8_t **pp, const uint8_t *desc_list_end,
Mp4Descr *mp4_descr, int mp4_descr_count, int pid,
MpegTSContext *ts, dvb_caption_info_t *dvbci)
Expand Down Expand Up @@ -1847,7 +1847,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
if (desc_list_end > p_end)
break;
for(;;) {
if (ff_mythtv_parse_mpeg2_descriptor(ts->stream, &items[last_item], stream_type, &p, desc_list_end,
if (ff_parse_mpeg2_descriptor(ts->stream, &items[last_item], stream_type, &p, desc_list_end,
mp4_descr, mp4_descr_count, pid, ts, &dvbci) < 0)
break;
}
Expand Down Expand Up @@ -2731,7 +2731,7 @@ static int mpegts_read_header(AVFormatContext *s)
ts->stream = s;
ts->auto_guess = 0;

if (s->iformat == &ff_mpegts_demuxer) {
if (s->iformat == &ff_mythtv_mpegts_demuxer) {
/* normal demux */

if (!ts->auto_guess) {
Expand Down Expand Up @@ -3125,7 +3125,7 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t target_ts, in
/**************************************************************/
/* parsing functions - called from other demuxers such as RTP */

MpegTSContext *ff_mythtv_mpegts_parse_open(AVFormatContext *s)
MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s)
{
MpegTSContext *ts;

Expand All @@ -3144,7 +3144,7 @@ MpegTSContext *ff_mythtv_mpegts_parse_open(AVFormatContext *s)

/* return the consumed length if a packet was output, or -1 if no
packet is output */
int ff_mythtv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
const uint8_t *buf, int len)
{
int len1;
Expand All @@ -3169,7 +3169,7 @@ int ff_mythtv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
return len1 - len;
}

void ff_mythtv_mpegts_parse_close(MpegTSContext *ts)
void ff_mpegts_parse_close(MpegTSContext *ts)
{
int i;

Expand Down
8 changes: 4 additions & 4 deletions mythtv/external/FFmpeg/libavformat/mpegts-mythtv.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@
typedef struct MpegTSContext MpegTSContext;

void mpegts_remove_stream(MpegTSContext *ts, int pid);
MpegTSContext *ff_mythtv_mpegts_parse_open(AVFormatContext *s);
int ff_mythtv_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
const uint8_t *buf, int len);
void ff_mythtv_mpegts_parse_close(MpegTSContext *ts);
MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s);
int ff_mythtv_parse_packet(MpegTSContext *ts, AVPacket *pkt,
const uint8_t *buf, int len);
void ff_mpegts_parse_close(MpegTSContext *ts);

typedef struct {
int use_au_start;
Expand Down
6 changes: 3 additions & 3 deletions mythtv/external/FFmpeg/libavformat/mpegts.c
Original file line number Diff line number Diff line change
Expand Up @@ -2257,7 +2257,7 @@ static int read_seek(AVFormatContext *s, int stream_index, int64_t target_ts, in
/**************************************************************/
/* parsing functions - called from other demuxers such as RTP */

MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s)
MpegTSContext *ff_old_mpegts_parse_open(AVFormatContext *s)
{
MpegTSContext *ts;

Expand All @@ -2276,7 +2276,7 @@ MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s)

/* return the consumed length if a packet was output, or -1 if no
packet is output */
int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
int ff_old_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
const uint8_t *buf, int len)
{
int len1;
Expand All @@ -2301,7 +2301,7 @@ int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
return len1 - len;
}

void ff_mpegts_parse_close(MpegTSContext *ts)
void ff_old_mpegts_parse_close(MpegTSContext *ts)
{
int i;

Expand Down
6 changes: 3 additions & 3 deletions mythtv/external/FFmpeg/libavformat/mpegts.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@

typedef struct MpegTSContext MpegTSContext;

MpegTSContext *ff_mpegts_parse_open(AVFormatContext *s);
int ff_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
MpegTSContext *ff_old_mpegts_parse_open(AVFormatContext *s);
int ff_old_mpegts_parse_packet(MpegTSContext *ts, AVPacket *pkt,
const uint8_t *buf, int len);
void ff_mpegts_parse_close(MpegTSContext *ts);
void ff_old_mpegts_parse_close(MpegTSContext *ts);

typedef struct {
int use_au_start;
Expand Down

0 comments on commit 340a68d

Please sign in to comment.