On Tue, 30 Apr 2013 17:19:21 +0200, Jindřich Makovička <[email protected]> wrote: > On Mon, Apr 29, 2013 at 9:10 PM, Anton Khirnov <[email protected]> wrote: > > > > On Mon, 29 Apr 2013 12:10:50 +0200, Jindřich Makovička <[email protected]> > > wrote: > >> Hi, > >> > >> this patch adds original and copyright flags from MPEG audio headers > >> to AVFormatContext, so they can be displayed by avprobe. > >> > >> Could this feature be included in upstream? We encountered MPEG-PS > >> sources that (ab)use the "original" flag to distinguish between > >> original and dubbed audio, so it would come handy. > >> > > > > I'm not against exposing this information in principle, but I don't like > > adding > > a format-specific field to AVCodecContext. History shows that it doesn't > > lead to > > anything good. > > > > I see two possible ways to expose this. > > One is through decoder-private AVOptions, which contrary to the name can > > also be > > used to retrieve values from opaque structs. > > I tried this approach before realizing that avctx->priv_data is > discarded by avcodec_close(), and unavailable after > avformat_find_stream_info() anyway. > > > Another is through newly added frame side data/metadata. > > Is it acceptable to simply export the 32bit MPEG header as a side data? >
How is this better than simply looking at the first four bytes of the packet data? -- Anton Khirnov _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
