Skip to content

Commit

Permalink
mpegts-mythtv.c: harmonize mpegts_read_packet
Browse files Browse the repository at this point in the history
in order for MHEG to work, mpegts_push_section needs to check for
pkt->size == -1 instead of the former 0.
  • Loading branch information
ulmus-scott authored and bennettpeter committed Aug 15, 2022
1 parent f49fd8e commit b011db8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mythtv/external/FFmpeg/libavformat/mpegts-mythtv.c
Expand Up @@ -2492,7 +2492,7 @@ static void mpegts_push_section(MpegTSFilter *filter, const uint8_t *section, in
return;
}

if (sect->new_packet && pkt && sect->st && pkt->size == 0) {
if (sect->new_packet && pkt && sect->st && pkt->size == -1) {
int pktLen = section_len + 184; /* Add enough for a complete TS payload. */
sect->new_packet = 0;
av_free_packet(pkt);
Expand Down Expand Up @@ -3567,7 +3567,7 @@ static int mpegts_read_packet(AVFormatContext *s, AVPacket *pkt)
MpegTSContext *ts = s->priv_data;
int ret, i;

//pkt->size = -1; // this breaks MHEG
pkt->size = -1;
ts->pkt = pkt;
ret = handle_packets(ts, 0);
if (ret < 0) {
Expand Down

0 comments on commit b011db8

Please sign in to comment.