Mercurial > libavformat.hg
comparison rm.c @ 241:3d92f793fd67 libavformat
64 bit pts for writing - more const usage
author | bellard |
---|---|
date | Wed, 10 Sep 2003 22:37:33 +0000 |
parents | 37e7cd3d544d |
children | a313e1080322 |
comparison
equal
deleted
inserted
replaced
240:e6f99d238179 | 241:3d92f793fd67 |
---|---|
321 rv10_write_header(s, 0, 0); | 321 rv10_write_header(s, 0, 0); |
322 put_flush_packet(&s->pb); | 322 put_flush_packet(&s->pb); |
323 return 0; | 323 return 0; |
324 } | 324 } |
325 | 325 |
326 static int rm_write_audio(AVFormatContext *s, uint8_t *buf, int size) | 326 static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size) |
327 { | 327 { |
328 uint8_t *buf1; | 328 uint8_t *buf1; |
329 RMContext *rm = s->priv_data; | 329 RMContext *rm = s->priv_data; |
330 ByteIOContext *pb = &s->pb; | 330 ByteIOContext *pb = &s->pb; |
331 StreamInfo *stream = rm->audio_stream; | 331 StreamInfo *stream = rm->audio_stream; |
346 stream->nb_frames++; | 346 stream->nb_frames++; |
347 av_free(buf1); | 347 av_free(buf1); |
348 return 0; | 348 return 0; |
349 } | 349 } |
350 | 350 |
351 static int rm_write_video(AVFormatContext *s, uint8_t *buf, int size) | 351 static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size) |
352 { | 352 { |
353 RMContext *rm = s->priv_data; | 353 RMContext *rm = s->priv_data; |
354 ByteIOContext *pb = &s->pb; | 354 ByteIOContext *pb = &s->pb; |
355 StreamInfo *stream = rm->video_stream; | 355 StreamInfo *stream = rm->video_stream; |
356 int key_frame = stream->enc->coded_frame->key_frame; | 356 int key_frame = stream->enc->coded_frame->key_frame; |
387 stream->nb_frames++; | 387 stream->nb_frames++; |
388 return 0; | 388 return 0; |
389 } | 389 } |
390 | 390 |
391 static int rm_write_packet(AVFormatContext *s, int stream_index, | 391 static int rm_write_packet(AVFormatContext *s, int stream_index, |
392 uint8_t *buf, int size, int force_pts) | 392 const uint8_t *buf, int size, int64_t pts) |
393 { | 393 { |
394 if (s->streams[stream_index]->codec.codec_type == | 394 if (s->streams[stream_index]->codec.codec_type == |
395 CODEC_TYPE_AUDIO) | 395 CODEC_TYPE_AUDIO) |
396 return rm_write_audio(s, buf, size); | 396 return rm_write_audio(s, buf, size); |
397 else | 397 else |