-
- if (container == HB_MUX_MP4)
- {
- /* now remove any other tracks that are set as burned and are picturesubs */
- int i = 0;
- int removedTracks = 0;
- NSEnumerator *enumerator = [subtitleArray objectEnumerator];
- id tempObject;
- NSMutableArray *tempArrayToDelete = [NSMutableArray array];
- BOOL removeTrack = NO;
- while ( tempObject = [enumerator nextObject] )
- {
-
- if ([[tempObject objectForKey:@"subtitleSourceTrackisPictureSub"] intValue] == 1)
- {
- /* if this is the first vobsub mark it. if not, remove it */
- if (removeTrack == NO)
- {
- /* make sure that this is set to be burned in */
- [tempObject setObject:[NSNumber numberWithInt:1] forKey:@"subtitleTrackBurned"];
- removeTrack = YES;
- }
- else
- {
- [tempArrayToDelete addObject:tempObject];
- removedTracks ++;
- }
- }
-
- i++;
- }
- /* check to see if there are tracks to remove from the array */
- if ([tempArrayToDelete count] > 0)
- {
- /* Popup a warning that hb only support one pic sub being burned in with mp4 */
- int status;
- status = NSRunAlertPanel(@"More than one vobsub is not supported in an mp4...",@"Your first vobsub track will now be used.", @"OK", nil, nil);
- [NSApp requestUserAttention:NSCriticalRequest];
-
- [subtitleArray removeObjectsInArray:tempArrayToDelete];
- [aTableView reloadData];
- }
- }