[FFmpeg-devel] NC camera patch

Aurelien Jacobs aurel
Sat Jan 10 00:58:16 CET 2009

nicolas martin wrote:

> > Oh, and your nc_read_header() seems to contain code which is
> > totally unrelated to your format (MJPEG, DIRAC, etc...).
> > And you don't need to use s->iformat->value if it's hardcoded
> > to MPEG4.
> I really don't know what to put there.
> In fact, I copied a chunk of code, I found in raw.c.
> The only thing I needed was to initialize my structure, that seems  
> quite useless now !
> So what should I put in it, now that I don't have to use a structure  
> anymore ?

I think you should at least have:

    st = av_new_stream();
    st->codec->codec_type = CODEC_TYPE_VIDEO;
    st->codec->codec_id = CODEC_ID_MPEG4;
    st->need_parsing = AVSTREAM_PARSE_FULL;

And no need to set .value in AVInputFormat.


More information about the ffmpeg-devel mailing list