lightful / DVBdirect

DVB easy handling tools for Linux
GNU General Public License v3.0
12 stars 6 forks source link

Fix mpegts error when no 'index' in data #5

Open garret1317 opened 1 year ago

garret1317 commented 1 year ago

Trying to run mpegts on a captured TS gave the following error:

Traceback (most recent call last):
  File "/home/g/Downloads/DVBdirect/./mpegts", line 91, in <module>
    channelStreams[lastChannelName].append(data['index'])
KeyError: 'index'

I added a check to see if 'index' was in fact in the data before doing stuff with it, and it now seems to work perfectly.

Sample capture, in a zip file (can't upload .mts)