Dear Jean:
1.
In .mpeg4 file,
audio codec: MPEG AAC Audio(mp4a)
In .rm file,
audio codec: A52 Audio(aka AC3)(a52)
crashed in audio.c line 287 avcodec_decode_audio4()
2.
Here is my source code:
in appDelegate.m:
Code: Select all
+ (void)initialize
{
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
NSNumber *skipLoopFilterDefaultValue;
int deviceSpeedCategory = [[UIDevice currentDevice] speedCategory];
if (deviceSpeedCategory < 3)
skipLoopFilterDefaultValue = kVLCSettingSkipLoopFilterNonKey;
else
skipLoopFilterDefaultValue = kVLCSettingSkipLoopFilterNonRef;
NSDictionary *appDefaults = @{kVLCSettingPasscodeKey : @"", kVLCSettingPasscodeOnKey : @(NO), kVLCSettingContinueAudioInBackgroundKey : @(YES), kVLCSettingStretchAudio : @(NO), kVLCSettingTextEncoding : kVLCSettingTextEncodingDefaultValue, kVLCSettingSkipLoopFilter : skipLoopFilterDefaultValue, kVLCSettingSubtitlesFont : kVLCSettingSubtitlesFontDefaultValue, kVLCSettingSubtitlesFontColor : kVLCSettingSubtitlesFontColorDefaultValue, kVLCSettingSubtitlesFontSize : kVLCSettingSubtitlesFontSizeDefaultValue, kVLCSettingDeinterlace : kVLCSettingDeinterlaceDefaultValue};
[defaults registerDefaults:appDefaults];
}
In my playList(UITableViewController)
Code: Select all
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
if([indexPath section] == 0){
//TODO 判斷是iphone or ipad
VLCMovieViewController *videoPlayer = [[VLCMovieViewController alloc] initWithNibName:@"VLCMovieViewController~ipad" bundle:nil];
UITableViewCell *cell = [self.tableView cellForRowAtIndexPath:indexPath];
/**
_foundMedia is an array fetched by [MLFile allFiles]
*/
videoPlayer.mediaItem = [_foundMedia objectAtIndex:[indexPath row]];
[self presentViewController:videoPlayer animated:YES completion:nil];
}
Is anything I did wrong?
1. What is the audio codec?
2. Please share a sample.