comparison output-example.c @ 5913:11bb10c37225 libavformat

Replace all occurences of PKT_FLAG_KEY with AV_PKT_FLAG_KEY. Patch by Jean-Daniel Dupas, devlists shadowlab org
author cehoyos
date Wed, 31 Mar 2010 12:29:58 +0000
parents 536e5527c1e0
children c34ed49b26c6
comparison
equal deleted inserted replaced
5912:10f577d87c71 5913:11bb10c37225
157 157
158 pkt.size= avcodec_encode_audio(c, audio_outbuf, audio_outbuf_size, samples); 158 pkt.size= avcodec_encode_audio(c, audio_outbuf, audio_outbuf_size, samples);
159 159
160 if (c->coded_frame && c->coded_frame->pts != AV_NOPTS_VALUE) 160 if (c->coded_frame && c->coded_frame->pts != AV_NOPTS_VALUE)
161 pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base); 161 pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
162 pkt.flags |= PKT_FLAG_KEY; 162 pkt.flags |= AV_PKT_FLAG_KEY;
163 pkt.stream_index= st->index; 163 pkt.stream_index= st->index;
164 pkt.data= audio_outbuf; 164 pkt.data= audio_outbuf;
165 165
166 /* write the compressed frame in the media file */ 166 /* write the compressed frame in the media file */
167 if (av_interleaved_write_frame(oc, &pkt) != 0) { 167 if (av_interleaved_write_frame(oc, &pkt) != 0) {
366 /* raw video case. The API will change slightly in the near 366 /* raw video case. The API will change slightly in the near
367 futur for that */ 367 futur for that */
368 AVPacket pkt; 368 AVPacket pkt;
369 av_init_packet(&pkt); 369 av_init_packet(&pkt);
370 370
371 pkt.flags |= PKT_FLAG_KEY; 371 pkt.flags |= AV_PKT_FLAG_KEY;
372 pkt.stream_index= st->index; 372 pkt.stream_index= st->index;
373 pkt.data= (uint8_t *)picture; 373 pkt.data= (uint8_t *)picture;
374 pkt.size= sizeof(AVPicture); 374 pkt.size= sizeof(AVPicture);
375 375
376 ret = av_interleaved_write_frame(oc, &pkt); 376 ret = av_interleaved_write_frame(oc, &pkt);
383 av_init_packet(&pkt); 383 av_init_packet(&pkt);
384 384
385 if (c->coded_frame->pts != AV_NOPTS_VALUE) 385 if (c->coded_frame->pts != AV_NOPTS_VALUE)
386 pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base); 386 pkt.pts= av_rescale_q(c->coded_frame->pts, c->time_base, st->time_base);
387 if(c->coded_frame->key_frame) 387 if(c->coded_frame->key_frame)
388 pkt.flags |= PKT_FLAG_KEY; 388 pkt.flags |= AV_PKT_FLAG_KEY;
389 pkt.stream_index= st->index; 389 pkt.stream_index= st->index;
390 pkt.data= video_outbuf; 390 pkt.data= video_outbuf;
391 pkt.size= out_size; 391 pkt.size= out_size;
392 392
393 /* write the compressed frame in the media file */ 393 /* write the compressed frame in the media file */