aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/nutenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-03-31 12:47:35 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-03-31 12:48:41 +0200
commit1caa4123bd83f8b1f8a4e11a8d8539be7d54b105 (patch)
tree094ece3f8531095920978d68b65e7119ab7007e7 /libavformat/nutenc.c
parent8b8bf89e52bc3bf4be1a9f10eb1eb153a443172f (diff)
parent229e2631be528c595650a7568c1d4df8af9c4944 (diff)
downloadffmpeg-1caa4123bd83f8b1f8a4e11a8d8539be7d54b105.tar.gz
Merge remote-tracking branch 'newdev/master'
* newdev/master: rtsp: Use GET_PARAMETER for keep-alive for generic RTSP servers mlp_parse.c: set AVCodecContext channel_layout APIChanges: mark the place where 0.6 was branched. avio: make get_checksum() internal. avio: move ff_crc04C11DB7_update() from avio.h -> avio_internal.h avio: make init_checksum() internal. NOT MERGED Add MxPEG decoder NOT MERGED Add support for picture_ptr field in MJpegDecodeContext NOT MERGED Move MJPEG's input buffer preprocessing in separate public function NOT MERGED Support reference picture defined by bitmask in MJPEG's SOS decoder sndio bug fix Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/nutenc.c')
-rw-r--r--libavformat/nutenc.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index fafbae86e5..9bb9a4e502 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -24,6 +24,7 @@
#include "libavcodec/mpegaudiodata.h"
#include "nut.h"
#include "internal.h"
+#include "avio_internal.h"
static int find_expected_header(AVCodecContext *c, int size, int key_frame, uint8_t out[64]){
int sample_rate= c->sample_rate;
@@ -284,17 +285,17 @@ static void put_packet(NUTContext *nut, AVIOContext *bc, AVIOContext *dyn_bc, in
int forw_ptr= dyn_size + 4*calculate_checksum;
if(forw_ptr > 4096)
- init_checksum(bc, ff_crc04C11DB7_update, 0);
+ ffio_init_checksum(bc, ff_crc04C11DB7_update, 0);
avio_wb64(bc, startcode);
ff_put_v(bc, forw_ptr);
if(forw_ptr > 4096)
- avio_wl32(bc, get_checksum(bc));
+ avio_wl32(bc, ffio_get_checksum(bc));
if(calculate_checksum)
- init_checksum(bc, ff_crc04C11DB7_update, 0);
+ ffio_init_checksum(bc, ff_crc04C11DB7_update, 0);
avio_write(bc, dyn_buf, dyn_size);
if(calculate_checksum)
- avio_wl32(bc, get_checksum(bc));
+ avio_wl32(bc, ffio_get_checksum(bc));
av_free(dyn_buf);
}
@@ -806,7 +807,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt){
needed_flags= get_needed_flags(nut, nus, fc, pkt);
header_idx= fc->header_idx;
- init_checksum(bc, ff_crc04C11DB7_update, 0);
+ ffio_init_checksum(bc, ff_crc04C11DB7_update, 0);
avio_w8(bc, frame_code);
if(flags & FLAG_CODED){
ff_put_v(bc, (flags^needed_flags) & ~(FLAG_CODED));
@@ -817,8 +818,8 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt){
if(flags & FLAG_SIZE_MSB) ff_put_v(bc, pkt->size / fc->size_mul);
if(flags & FLAG_HEADER_IDX) ff_put_v(bc, header_idx= best_header_idx);
- if(flags & FLAG_CHECKSUM) avio_wl32(bc, get_checksum(bc));
- else get_checksum(bc);
+ if(flags & FLAG_CHECKSUM) avio_wl32(bc, ffio_get_checksum(bc));
+ else ffio_get_checksum(bc);
avio_write(bc, pkt->data + nut->header_len[header_idx], pkt->size - nut->header_len[header_idx]);
nus->last_flags= flags;