My debugger lied to me.

The crash was actually in sws_getContext() which makes far more sense.

I changed the call to:

    sws_opts = sws_getContext(16, 16, PIX_FMT_YUV420P,
                              16, 16, PIX_FMT_YUV420P, sws_flags,
                              NULL,NULL,NULL);

but it still crashes.

Stuart

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Stuart Smith
Sent: 13 September 2009 08:31
To: 'Libav* user questions and discussions'
Subject: [libav-user] picture size invalid calling avformat_alloc_context();


Hi, have just updated my local SVN working copy and now I get 'picture size
invalid (268524928x3435973836) when calling avformat_alloc_contex() and I
get an 'access violation'.

 

This used to work under VS2008 using shared libraries built under Mingw so
I'm not too sure what I have done wrong.

 

The code is as follows (copied from ffmpeg.c):

 

    av_register_all();

 

    for(i=0; i<CODEC_TYPE_NB; i++){

        avcodec_opts[i]= avcodec_alloc_context2((CodecType)i);

    }

    avformat_opts = avformat_alloc_context();

    sws_opts = sws_getContext(16, 16, (PixelFormat)0, 16, 16,
(PixelFormat)0, sws_flags, NULL,NULL,NULL);

 

Any advice much appreciated.

 

Thanks

Stuart

 

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user

Reply via email to