On Sun, Dec 12, 2010 at 1:17 AM, Nicolas George
<[email protected]> wrote:
> Le primidi 21 frimaire, an CCXIX, Thomas Worth a écrit :
>> if (oc->oformat->flags & AVFMT_RAWPICTURE) {
>> /* raw video case. The API will change slightly in the near
>> futur for that */
>
> Did you read that comment?
Yes. It's a fairly nicely worded comment, but I'd fix the spelling
error. Is there anything else you want me to proofread? :-)
Seriously though, let me clarify: I am using this snippet of code to
output uncompressed files. This works fine without AVFrame structures
altogether because I don't need to pass the raw data to the encoder. I
just output it directly since the packing order is already correct.
However, it seems av_write_frame() still needs the packet size to
match the length of the frame data, ostensibly to know how much data
to write.
>
>> pkt.data= (uint8_t *)picture;
>> pkt.size= sizeof(AVPicture);
>
>> Why is pkt.size set to sizeof(AVPicture)?
>
> Because pkt.data is picture, and sizeof(picture) == sizeof(AVPicture).
> pkt.size is unused anyway in this case.
I don't understand. I can't get sizeof(AVPicture) to return anything
other than 32.
//from avcodec.h
typedef struct AVPicture {
uint8_t *data[4];
int linesize[4]; ///< number of bytes per line
} AVPicture;
> You did not use the code unmodified, as you already trimmed the else clause.
The else doesn't apply to what I'm doing in my code. The picture is
always raw data, so if (oc->oformat->flags & AVFMT_RAWPICTURE) always
evaluates to 1.
I have this working, but I just want to know why the pkt.size is being
set to the size of definition of AVPicture.
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user