Mercurial > libavformat.hg
comparison img.c @ 468:60f897e8dd2d libavformat
pass AVPacket into av_write_frame()
fixes the random dts/pts during encoding
asf preroll fix
no more initial zero frames for b frame encoding
mpeg-es dts during demuxing fixed
.ffm timestamp scale fixed, ffm is still broken though
author | michael |
---|---|
date | Sat, 29 May 2004 02:06:32 +0000 |
parents | b69898ffc92a |
children | 0fdc96c2f2fe |
comparison
equal
deleted
inserted
replaced
467:40069a91d1a0 | 468:60f897e8dd2d |
---|---|
298 img->is_pipe = 1; | 298 img->is_pipe = 1; |
299 | 299 |
300 return 0; | 300 return 0; |
301 } | 301 } |
302 | 302 |
303 static int img_write_packet(AVFormatContext *s, int stream_index, | 303 static int img_write_packet(AVFormatContext *s, AVPacket *pkt) |
304 const uint8_t *buf, int size, int64_t pts) | |
305 { | 304 { |
306 VideoData *img = s->priv_data; | 305 VideoData *img = s->priv_data; |
307 AVStream *st = s->streams[stream_index]; | 306 AVStream *st = s->streams[pkt->stream_index]; |
308 ByteIOContext pb1, *pb; | 307 ByteIOContext pb1, *pb; |
309 AVPicture *picture; | 308 AVPicture *picture; |
310 int width, height, ret; | 309 int width, height, ret; |
311 char filename[1024]; | 310 char filename[1024]; |
312 AVImageInfo info; | 311 AVImageInfo info; |
313 | 312 |
314 width = st->codec.width; | 313 width = st->codec.width; |
315 height = st->codec.height; | 314 height = st->codec.height; |
316 | 315 |
317 picture = (AVPicture *)buf; | 316 picture = (AVPicture *)pkt->data; |
318 | 317 |
319 if (!img->is_pipe) { | 318 if (!img->is_pipe) { |
320 if (get_frame_filename(filename, sizeof(filename), | 319 if (get_frame_filename(filename, sizeof(filename), |
321 img->path, img->img_number) < 0) | 320 img->path, img->img_number) < 0) |
322 return -EIO; | 321 return -EIO; |