[FFmpeg-soc] Extend TSMuxer to H264 muxing

Baptiste Coudurier baptiste.coudurier at smartjog.com
Mon Apr 14 08:46:53 CEST 2008


On Mon, Apr 14, 2008 at 02:40:54PM +0800, zhentan feng wrote:
> [...]
>
> > > +                if(st->codec->codec_id == CODEC_ID_H264){
> > > +                    H264Context * h_st = st->codec->priv_data;
> >
> > This is invalid, there is a reason why its called priv_data, and that is
> > that it is private to the codec.
>
> I think it is the key point to write descriptors into PMT for AVC stream.
> Can't I get the h264 codec information when init TS out stream?
> Do you mean the *priv_data* only could be used by libavcodec functions, we
> can't read some information from it by other extern functions?
> If so, I am a little confused how could I get information when init the
> descriptor?
>

No you cannot, only libavcodec h264 decoder is allowed to use priv_data,
TS muxer has to parse PPS/PPS and gather needed infos.

--
Baptiste COUDURIER                              GnuPG Key Id: 0x5C1ABAAA
SMARTJOG SAS                                     http://www.smartjog.com
Key fingerprint                 8D77134D20CC9220201FC5DB0AC9325C5C1ABAAA
Phone: +33 1 49966312



More information about the FFmpeg-soc mailing list