Undefined index: track_data_offsets (MKV)

Locked
Sweden
User
Posts:8
Joined:Mon Jul 18, 2011 8:45 am
Are you a spambot?:no
Undefined index: track_data_offsets (MKV)

Post by Sweden » Tue Aug 09, 2011 4:22 pm

Hi!

Recently I decided to enable all warnings in PHP and when doing this I get a warning on a couple of files that I'm checking

PHP Notice: Undefined index: track_data_offsets in C:\web\FireScene\getid32\module.audio-video.matroska.php on line 1315
Line 1315: $dts_offset = $info['matroska']['track_data_offsets'][$trackarray['TrackNumber']]['offset'];


Is there a fix for this? And do you need a file to test with? If so let me know and I'll post one.
Maybe worth mentioning is that the only modification I have on the code is that the whole "case EBML_ID_CLUSTER:" case is commented out (to worth with the files I use that dosnt have the video/audio data).

Using version 1.9 of getid3

James Heinrich
getID3() v1 developer
Posts:1477
Joined:Fri May 04, 2001 4:00 pm
Are you a spambot?:no
Location:Northern Ontario, Canada
Contact:

Re: Undefined index: track_data_offsets (MKV)

Post by James Heinrich » Tue Aug 09, 2011 5:00 pm

Please provide a sample file that shows this problem.
Please also provide a sample file of a Matroska file that has no audio or video. You shouldn't need to comment anything out to make getID3 work :)
(if one file does both, that's fine)

Sweden
User
Posts:8
Joined:Mon Jul 18, 2011 8:45 am
Are you a spambot?:no

Re: Undefined index: track_data_offsets (MKV)

Post by Sweden » Tue Aug 09, 2011 5:11 pm

Hello and thanks for you reply! Here is a sample file, the fileformat is made to only contain the header data:
http://www.2shared.com/file/TGS-jIkI/th ... ayx26.html

Why I have to comment out that case is because it will otherwise I get "trying to allocate xxx memory" error.

James Heinrich
getID3() v1 developer
Posts:1477
Joined:Fri May 04, 2001 4:00 pm
Are you a spambot?:no
Location:Northern Ontario, Canada
Contact:

Re: Undefined index: track_data_offsets (MKV)

Post by James Heinrich » Tue Aug 09, 2011 6:25 pm

Please try the attached version and let me know if you still have a problem with any of your sample files.
Attachments
module.audio-video.matroska.php
(132.79KiB)Downloaded 865 times

Sweden
User
Posts:8
Joined:Mon Jul 18, 2011 8:45 am
Are you a spambot?:no

Re: Undefined index: track_data_offsets (MKV)

Post by Sweden » Sat Aug 20, 2011 11:12 pm

Hi.

Just wanted to let you know I've been having this now for a while and its just working fine.

Thanks a lot!

James Heinrich
getID3() v1 developer
Posts:1477
Joined:Fri May 04, 2001 4:00 pm
Are you a spambot?:no
Location:Northern Ontario, Canada
Contact:

Re: Undefined index: track_data_offsets (MKV)

Post by James Heinrich » Sat Aug 20, 2011 11:38 pm

Good to hear, thanks.

Locked