[Libav-user] Encoding to FLAC

2014-12-11 Thread Peter Belkner
Hello, I'm trying to encode to FLAC via avcodec/avformat. Unfortunately this gives invalid FLACs. I'm following "doc/examples/transcoding.c" which, of course, makes the problem reproducible. If I transcode a valid FLAC to FLAC with the example program "transcode" I get a FLAC which is not va

Re: [Libav-user] decoding/encoding example passes c->priv_data to av_opt_set; shouldn't it just pass c?

2014-12-11 Thread Carl Eugen Hoyos
Michael Bradshaw writes: > After I suggest passing the AVCodecContext* > instead of the priv_data member, like so: > >     av_opt_set(c, "preset", "slow", 0); > they report that the options are correctly set. Maybe you should consider to send a patch to the developer mailing list? (I did not

Re: [Libav-user] understanding AVPackets and AVFrames

2014-12-11 Thread Maziar Mehrabi
Hi, How do you decode your frames? If you wanna know when decoding of a frame is finished why not using int *got_picture_ptr which gets modified (returns) by avcodec_decode_video2? Regards, Maziar Mehrabi -- Hälsningar, Maziar Mehrabi, On Wed, Dec 10, 2014 at 10:50 AM, Alina lifshits wrote:

[Libav-user] decoding/encoding example passes c->priv_data to av_opt_set; shouldn't it just pass c?

2014-12-11 Thread Michael Bradshaw
In the encoding/decoding example[1], in the video_encode_example() function, av_opt_set() is used to set the option "preset" to "slow" (here, c is a AVCodecContext*): av_opt_set(c->priv_data, "preset", "slow", 0); I have come across a few people repeating this, all stating that the options ar

[Libav-user] understanding AVPackets and AVFrames

2014-12-11 Thread Alina lifshits
Hello, I am decoding h264 live stream (I-Frames & P-Frames only) and the FF_THREAD_FRAME flag is turned off to keep small latency. In my app I need to know exactly when an AVPacket is decoded and produces an AVFrame. To do so I am using the AVFrame.pkt_pts and AVFrame.pkt_dts fields to find