[FFmpeg-devel] [PATCH 3/9] lavf/ffm: store/restore private codec context

Michael Niedermayer michaelni at gmx.at
Wed Nov 12 17:53:57 CET 2014


On Wed, Nov 12, 2014 at 05:47:01PM +0100, Stefano Sabatini wrote:
> On date Wednesday 2014-11-12 09:09:43 +0100, Nicolas George encoded:
> > Le primidi 21 brumaire, an CCXXIII, Lukasz Marek a écrit :
> > > +static int ffm_write_header_codec_private_ctx(AVIOContext *pb, void *priv_data, int type)
> > > +{
> > > +    AVIOContext *tmp;
> > > +    char *buf = NULL;
> > > +
> > > +    if (priv_data) {
> > > +        if (avio_open_dyn_buf(&tmp) < 0)
> > > +            return AVERROR(ENOMEM);
> > 
> > > +        av_opt_serialize(priv_data, AV_OPT_FLAG_ENCODING_PARAM | type, 1, &buf, '=', ',');
> >                                                                           ^
> 
> > Unless I am mistaken, this is skip_default. What happens if the instance
> > that reads the file does not have the same defaults as the instance that has
> > written it? For example, what happens if ffmpeg feeding ffserver is not the
> > same version as ffserver?
> 
> We should specify an FFM version, and abort in case it's not
> compatible.

The problem is that the codec context is used to transport the
values into the muxer instead of some form of key/value list, string
or AVDictionary.

now, iam not sure changing this as part of this patchset is a good
idea, its maybe better to try to get this in and not entangle it to
more changes ...

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The real ebay dictionary, page 1
"Used only once"    - "Some unspecified defect prevented a second use"
"In good condition" - "Can be repaird by experienced expert"
"As is" - "You wouldnt want it even if you were payed for it, if you knew ..."
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20141112/1e8bf358/attachment.asc>


More information about the ffmpeg-devel mailing list