From: Chris R. <ran...@ya...> - 2011-09-05 21:41:14
|
Hi, I have finally managed to get the audio working in bug #403's TS files. The fix is in two parts: a) The decoder must discard any header packet that FFmpeg cannot read the sample rate and audio channels from, and wait for the next packet instead. b) The demuxer needs to track preview frames for the audio and video streams separately, because otherwise the first audio frame is not marked with BUF_FLAG_HEADER. (And hence never selects the correct codec to open). PID autodetection needs to be removed from the demuxer too: that patch has already been posted. So I'll post the second demuxer patch once the kinks in the first patch have been resolved. And I've thrown in a minor clean-up patch for the FFmpeg video decoder too. Cheers, Chris |