[Libav-user] av_read_frame concatenating data packets??

Gary Overall goverall at hotmail.com
Mon Apr 8 04:21:25 CEST 2013

I have a TS file that presently includes 3 streams:1) h264 Video 2) aac audio 3) See Below
The third stream contains some data that is being presented in ID3 format.  The stream has a stream-ID of 0xBD (stream type private??). There are several packets (e.g. 5) of this type spread throughout the file, each with it own PTS.  

"avformat_open_input()" does not identify (unknown type) this third stream and "avformat_find_stream_info()" guesses it is an audio mp3 stream. Since I know the stream is data, I have tried overriding the stream type to AVMEDIA_TYPE_NB, AVMEDIA_TYPE_DATA, and AVMEDIA_TYPE_ATTACHMENT. I do not need a decoder for this stream since I can see the data in the packets returned from "av_read_frame()" and I can decode the data myself, however there is a problem that appears regardless my stream type overrides:

"av_read_frame" seems to be saving up the data from all 5 of the packets and presenting them all to me as one packet with the PTS of the first one.  I would really like each of the packets in the file to return from "av_read_frame()" individually, each with its own PTS. 
Does anyone know why av_read_frame() might be concatenating data packets and consolidating them into a single packet?
Thank You,This has been a hard one for me.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20130407/e568be49/attachment.html>

More information about the Libav-user mailing list