Mercurial > libavformat.hg
comparison yuv4mpeg.c @ 775:c5077fdab490 libavformat
AVPacket.pos
author | michael |
---|---|
date | Thu, 26 May 2005 20:17:12 +0000 |
parents | af4e24d6310c |
children | feca73904e67 |
comparison
equal
deleted
inserted
replaced
774:820863425158 | 775:c5077fdab490 |
---|---|
354 | 354 |
355 packet_size = avpicture_get_size(st->codec.pix_fmt, width, height); | 355 packet_size = avpicture_get_size(st->codec.pix_fmt, width, height); |
356 if (packet_size < 0) | 356 if (packet_size < 0) |
357 return -1; | 357 return -1; |
358 | 358 |
359 if (av_new_packet(pkt, packet_size) < 0) | 359 if (av_get_packet(&s->pb, pkt, packet_size) != packet_size) |
360 return AVERROR_IO; | 360 return AVERROR_IO; |
361 | 361 |
362 pkt->stream_index = 0; | 362 pkt->stream_index = 0; |
363 ret = get_buffer(&s->pb, pkt->data, pkt->size); | 363 return 0; |
364 if (ret != pkt->size) { | |
365 av_free_packet(pkt); | |
366 return AVERROR_IO; | |
367 } else { | |
368 return 0; | |
369 } | |
370 } | 364 } |
371 | 365 |
372 static int yuv4_read_close(AVFormatContext *s) | 366 static int yuv4_read_close(AVFormatContext *s) |
373 { | 367 { |
374 return 0; | 368 return 0; |