[FFmpeg-devel] [RFC] cryptokey options

Reimar Döffinger Reimar.Doeffinger
Fri Oct 19 15:24:38 CEST 2007


Hello,
On Fri, Oct 19, 2007 at 02:45:45PM +0200, Baptiste Coudurier wrote:
> Reimar D?ffinger wrote:
> > On Fri, Oct 19, 2007 at 03:00:20PM +0300, Kostya wrote:
> >> On Fri, Oct 19, 2007 at 12:29:44PM +0200, Reimar D?ffinger wrote:
> >>> I tried to implement this via a generic "binary" option type, but it
> >>> does not seem to work, avfc->key stays NULL in the demuxer.
> >>> Maybe that is just because I don't know how to use ffmpeg though...
> >>> Fixes welcome.
> >> Preserve original 'bin' variable pointer.
> >> You seem to memcpy data _after_ decoded string.
> > 
> > Ouch, obviously. But that does not explain why key kept being NULL in
> > the demuxer...
> > 
> 
> I think problem is in opt_input_file:
> 
>  for(i=0; i<opt_name_count; i++){
>         const AVOption *opt;
>         double d= av_get_double(avformat_opts, opt_names[i], &opt);
>         if(!isnan(d) && (opt->flags&AV_OPT_FLAG_DECODING_PARAM))
>             av_set_double(ic, opt_names[i], d);
>     }
> 
> Here av_get_double for cryptokey returns nan.

Grmpf. That code does not even handle the existing string and
AVRational stuff correctly (though the later at least works "mostly").

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list