diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c index 8d80e072a0..9cc17ccb1d 100644 --- a/libavformat/mpegtsenc.c +++ b/libavformat/mpegtsenc.c @@ -1066,6 +1066,9 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st, } if (len > 0xffff) len = 0; + if (st->codec->codec_type == AVMEDIA_TYPE_VIDEO) { + len = 0; + } *q++ = len >> 8; *q++ = len; val = 0x80; diff --git a/tests/ref/lavf/ts b/tests/ref/lavf/ts index d457dfa136..1381f09f19 100644 --- a/tests/ref/lavf/ts +++ b/tests/ref/lavf/ts @@ -1,3 +1,3 @@ -e0738e00907d371ffbdee5caeab4277d *./tests/data/lavf/lavf.ts +cca6bca512605bbde20b7aa5cccf4850 *./tests/data/lavf/lavf.ts 407020 ./tests/data/lavf/lavf.ts ./tests/data/lavf/lavf.ts CRC=0x71287e25