[FFmpeg-devel] Update mpegts only handle defined stream_type

Tin Nguyen nguyentrongtin89 at gmail.com
Mon Sep 23 10:29:51 EEST 2019


Dear All,

Previous week, I faced with the issue when work with .ts container file.
The problem is ffmpeg always recognize 1 stream is mp3 stream, but look
like it's not mp3 stream.
Trace log below:
....
[mpegts @ 0x7ff286800400] stream=2 stream_type=f1 pid=1001 prog_reg_desc=
..
Probing mp3 score:1 size:128
[mpegts @ 0x7ff286800400] Probe with size=128, packets=1 detected mp3 with
score=1
Probing mp3 score:1 size:256
[mpegts @ 0x7ff286800400] Probe with size=256, packets=2 detected mp3 with
score=1
Probing mp3 score:1 size:512
[mpegts @ 0x7ff286800400] Probe with size=512, packets=4 detected mp3 with
score=1
...
Probing mp3 score:1 size:4096
[mpegts @ 0x7ff286800400] Probe with size=4096, packets=32 detected mp3
with score=1
....
[mp3float @ 0x7ff289000600] Header missing
(almost packets can't be decoded and throw Header Missing - since the
stream wasn't encoded with mp3float)

I fixed the issue by define new function in mpeg.h to check whether
stream_type of specified stream ile was defined in mpeg.h or not. If it was
not defined, i will force it to STREAM_TYPE_PRIVATE_DATA

Please check attached patch file and feel free to give me any feedback.

Thanks and Best regards,
*Tin Nguyen*

Mobile: 0908235566
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-All-stream_type-not-listed-in-mpeg.h-should-be-consi.patch
Type: application/octet-stream
Size: 2014 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20190923/c58ba712/attachment.obj>


More information about the ffmpeg-devel mailing list