comparison nutenc.c @ 2346:cbcd840cf971 libavformat

store headers twice (getting closer to spec compliance ...)
author michael
date Thu, 09 Aug 2007 21:14:00 +0000
parents b73b443c43d0
children 5c32dd0eafc6
comparison
equal deleted inserted replaced
2345:b73b443c43d0 2346:cbcd840cf971
495 put_buffer(bc, pkt->data, pkt->size); 495 put_buffer(bc, pkt->data, pkt->size);
496 nus->last_flags= flags; 496 nus->last_flags= flags;
497 return 0; 497 return 0;
498 } 498 }
499 499
500 static int write_trailer(AVFormatContext *s){
501 NUTContext *nut= s->priv_data;
502 ByteIOContext *bc= &s->pb;
503
504 write_headers(nut, bc);
505 put_flush_packet(bc);
506
507 return 0;
508 }
509
500 AVOutputFormat nut_muxer = { 510 AVOutputFormat nut_muxer = {
501 "nut", 511 "nut",
502 "nut format", 512 "nut format",
503 "video/x-nut", 513 "video/x-nut",
504 "nut", 514 "nut",
511 CODEC_ID_MP2, /* AC3 needs liba52 decoder */ 521 CODEC_ID_MP2, /* AC3 needs liba52 decoder */
512 #endif 522 #endif
513 CODEC_ID_MPEG4, 523 CODEC_ID_MPEG4,
514 write_header, 524 write_header,
515 write_packet, 525 write_packet,
516 // write_trailer, 526 write_trailer,
517 .flags = AVFMT_GLOBALHEADER, 527 .flags = AVFMT_GLOBALHEADER,
518 .codec_tag= (const AVCodecTag*[]){codec_bmp_tags, codec_wav_tags, 0}, 528 .codec_tag= (const AVCodecTag*[]){codec_bmp_tags, codec_wav_tags, 0},
519 }; 529 };