Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
b7f2fdde
Commit
b7f2fdde
authored
Mar 14, 2011
by
Anton Khirnov
Committed by
Ronald S. Bultje
Mar 17, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avio: rename put_flush_packet -> avio_flush
Signed-off-by:
Ronald S. Bultje
<
rsbultje@gmail.com
>
parent
35f10235
Hide whitespace changes
Inline
Side-by-side
Showing
47 changed files
with
104 additions
and
99 deletions
+104
-99
a64.c
libavformat/a64.c
+1
-1
adtsenc.c
libavformat/adtsenc.c
+1
-1
aiffenc.c
libavformat/aiffenc.c
+2
-2
amr.c
libavformat/amr.c
+2
-2
asfenc.c
libavformat/asfenc.c
+4
-4
assenc.c
libavformat/assenc.c
+3
-3
au.c
libavformat/au.c
+2
-2
avienc.c
libavformat/avienc.c
+4
-4
avio.h
libavformat/avio.h
+2
-1
aviobuf.c
libavformat/aviobuf.c
+7
-3
crcenc.c
libavformat/crcenc.c
+1
-1
daud.c
libavformat/daud.c
+1
-1
dvenc.c
libavformat/dvenc.c
+1
-1
ffmenc.c
libavformat/ffmenc.c
+3
-3
ffmetaenc.c
libavformat/ffmetaenc.c
+2
-2
filmstripenc.c
libavformat/filmstripenc.c
+1
-1
flacenc.c
libavformat/flacenc.c
+2
-2
flvenc.c
libavformat/flvenc.c
+1
-1
framecrcenc.c
libavformat/framecrcenc.c
+1
-1
gif.c
libavformat/gif.c
+3
-3
gxfenc.c
libavformat/gxfenc.c
+4
-4
idroqenc.c
libavformat/idroqenc.c
+1
-1
img2.c
libavformat/img2.c
+3
-3
ivfenc.c
libavformat/ivfenc.c
+1
-1
libnut.c
libavformat/libnut.c
+2
-2
matroskaenc.c
libavformat/matroskaenc.c
+2
-2
md5enc.c
libavformat/md5enc.c
+1
-1
mmf.c
libavformat/mmf.c
+2
-2
movenc.c
libavformat/movenc.c
+3
-3
mp3enc.c
libavformat/mp3enc.c
+1
-1
mpegenc.c
libavformat/mpegenc.c
+3
-3
mpegtsenc.c
libavformat/mpegtsenc.c
+3
-3
mpjpeg.c
libavformat/mpjpeg.c
+2
-2
mxfenc.c
libavformat/mxfenc.c
+3
-3
nutenc.c
libavformat/nutenc.c
+2
-2
oggenc.c
libavformat/oggenc.c
+2
-2
rawenc.c
libavformat/rawenc.c
+1
-1
rmenc.c
libavformat/rmenc.c
+4
-4
rsoenc.c
libavformat/rsoenc.c
+2
-2
rtpdec.c
libavformat/rtpdec.c
+3
-3
rtpenc.c
libavformat/rtpenc.c
+2
-2
soxenc.c
libavformat/soxenc.c
+2
-2
spdifenc.c
libavformat/spdifenc.c
+1
-1
swfenc.c
libavformat/swfenc.c
+3
-3
vc1testenc.c
libavformat/vc1testenc.c
+2
-2
wav.c
libavformat/wav.c
+4
-4
yuv4mpeg.c
libavformat/yuv4mpeg.c
+1
-1
No files found.
libavformat/a64.c
View file @
b7f2fdde
...
...
@@ -149,7 +149,7 @@ static int a64_write_packet(struct AVFormatContext *s, AVPacket *pkt)
break
;
}
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
libavformat/adtsenc.c
View file @
b7f2fdde
...
...
@@ -132,7 +132,7 @@ static int adts_write_packet(AVFormatContext *s, AVPacket *pkt)
}
}
avio_write
(
pb
,
pkt
->
data
,
pkt
->
size
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
libavformat/aiffenc.c
View file @
b7f2fdde
...
...
@@ -98,7 +98,7 @@ static int aiff_write_header(AVFormatContext *s)
av_set_pts_info
(
s
->
streams
[
0
],
64
,
1
,
s
->
streams
[
0
]
->
codec
->
sample_rate
);
/* Data is starting here */
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
@@ -140,7 +140,7 @@ static int aiff_write_trailer(AVFormatContext *s)
/* return to the end */
avio_seek
(
pb
,
end_size
,
SEEK_SET
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
}
return
0
;
...
...
libavformat/amr.c
View file @
b7f2fdde
...
...
@@ -50,14 +50,14 @@ static int amr_write_header(AVFormatContext *s)
{
return
-
1
;
}
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
static
int
amr_write_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
avio_write
(
s
->
pb
,
pkt
->
data
,
pkt
->
size
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
#endif
/* CONFIG_AMR_MUXER */
...
...
libavformat/asfenc.c
View file @
b7f2fdde
...
...
@@ -574,7 +574,7 @@ static int asf_write_header(AVFormatContext *s)
return
-
1
;
}
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
asf
->
packet_nb_payloads
=
0
;
asf
->
packet_timestamp_start
=
-
1
;
...
...
@@ -672,7 +672,7 @@ static void flush_packet(AVFormatContext *s)
avio_write
(
s
->
pb
,
asf
->
packet_buf
,
s
->
packet_size
-
packet_hdr_size
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
asf
->
nb_packets
++
;
asf
->
packet_nb_payloads
=
0
;
asf
->
packet_timestamp_start
=
-
1
;
...
...
@@ -864,7 +864,7 @@ static int asf_write_trailer(AVFormatContext *s)
if
((
!
asf
->
is_streamed
)
&&
(
asf
->
nb_index_count
!=
0
))
{
asf_write_index
(
s
,
asf
->
index_ptr
,
asf
->
maximum_packet
,
asf
->
nb_index_count
);
}
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
if
(
asf
->
is_streamed
||
url_is_streamed
(
s
->
pb
))
{
put_chunk
(
s
,
0x4524
,
0
,
0
);
/* end of stream */
...
...
@@ -875,7 +875,7 @@ static int asf_write_trailer(AVFormatContext *s)
asf_write_header1
(
s
,
file_size
,
data_size
-
asf
->
data_offset
);
}
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
av_free
(
asf
->
index_ptr
);
return
0
;
}
...
...
libavformat/assenc.c
View file @
b7f2fdde
...
...
@@ -50,7 +50,7 @@ static int write_header(AVFormatContext *s)
last
=
p
;
}
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
@@ -59,7 +59,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
{
avio_write
(
s
->
pb
,
pkt
->
data
,
pkt
->
size
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
@@ -72,7 +72,7 @@ static int write_trailer(AVFormatContext *s)
avio_write
(
s
->
pb
,
avctx
->
extradata
+
ass
->
extra_index
,
avctx
->
extradata_size
-
ass
->
extra_index
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
libavformat/au.c
View file @
b7f2fdde
...
...
@@ -74,7 +74,7 @@ static int au_write_header(AVFormatContext *s)
return
-
1
;
}
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
@@ -99,7 +99,7 @@ static int au_write_trailer(AVFormatContext *s)
avio_wb32
(
pb
,
(
uint32_t
)(
file_size
-
24
));
avio_seek
(
pb
,
file_size
,
SEEK_SET
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
}
return
0
;
...
...
libavformat/avienc.c
View file @
b7f2fdde
...
...
@@ -393,7 +393,7 @@ static int avi_write_header(AVFormatContext *s)
avi
->
movi_list
=
ff_start_tag
(
pb
,
"LIST"
);
ffio_wfourcc
(
pb
,
"movi"
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
@@ -438,7 +438,7 @@ static int avi_write_ix(AVFormatContext *s)
avio_wl32
(
pb
,
((
uint32_t
)
ie
->
len
&
~
0x80000000
)
|
(
ie
->
flags
&
0x10
?
0
:
0x80000000
));
}
put_flush_packet
(
pb
);
avio_flush
(
pb
);
pos
=
avio_tell
(
pb
);
/* Updating one entry in the AVI OpenDML master index */
...
...
@@ -578,7 +578,7 @@ static int avi_write_packet(AVFormatContext *s, AVPacket *pkt)
if
(
size
&
1
)
avio_w8
(
pb
,
0
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
@@ -624,7 +624,7 @@ static int avi_write_trailer(AVFormatContext *s)
avi_write_counters
(
s
,
avi
->
riff_id
);
}
}
put_flush_packet
(
pb
);
avio_flush
(
pb
);
for
(
i
=
0
;
i
<
s
->
nb_streams
;
i
++
)
{
AVIStream
*
avist
=
s
->
streams
[
i
]
->
priv_data
;
...
...
libavformat/avio.h
View file @
b7f2fdde
...
...
@@ -435,6 +435,7 @@ attribute_deprecated int url_fprintf(AVIOContext *s, const char *fmt, ...) __att
#else
attribute_deprecated
int
url_fprintf
(
AVIOContext
*
s
,
const
char
*
fmt
,
...);
#endif
attribute_deprecated
void
put_flush_packet
(
AVIOContext
*
s
);
/**
* @}
*/
...
...
@@ -529,7 +530,7 @@ int avio_printf(AVIOContext *s, const char *fmt, ...);
attribute_deprecated
char
*
url_fgets
(
AVIOContext
*
s
,
char
*
buf
,
int
buf_size
);
#endif
void
put_flush_packet
(
AVIOContext
*
s
);
void
avio_flush
(
AVIOContext
*
s
);
/**
...
...
libavformat/aviobuf.c
View file @
b7f2fdde
...
...
@@ -170,7 +170,7 @@ void avio_write(AVIOContext *s, const unsigned char *buf, int size)
}
}
void
put_flush_packet
(
AVIOContext
*
s
)
void
avio_flush
(
AVIOContext
*
s
)
{
flush_buffer
(
s
);
s
->
must_flush
=
0
;
...
...
@@ -393,6 +393,10 @@ int url_fprintf(AVIOContext *s, const char *fmt, ...)
avio_write
(
s
,
buf
,
strlen
(
buf
));
return
ret
;
}
void
put_flush_packet
(
AVIOContext
*
s
)
{
avio_flush
(
s
);
}
#endif
int
avio_put_str
(
AVIOContext
*
s
,
const
char
*
str
)
...
...
@@ -1013,7 +1017,7 @@ int url_open_buf(AVIOContext **s, uint8_t *buf, int buf_size, int flags)
int
url_close_buf
(
AVIOContext
*
s
)
{
put_flush_packet
(
s
);
avio_flush
(
s
);
return
s
->
buf_ptr
-
s
->
buffer
;
}
#endif
...
...
@@ -1141,7 +1145,7 @@ int url_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer)
padding
=
FF_INPUT_BUFFER_PADDING_SIZE
;
}
put_flush_packet
(
s
);
avio_flush
(
s
);
*
pbuffer
=
d
->
buffer
;
size
=
d
->
size
;
...
...
libavformat/crcenc.c
View file @
b7f2fdde
...
...
@@ -50,7 +50,7 @@ static int crc_write_trailer(struct AVFormatContext *s)
snprintf
(
buf
,
sizeof
(
buf
),
"CRC=0x%08x
\n
"
,
crc
->
crcval
);
avio_write
(
s
->
pb
,
buf
,
strlen
(
buf
));
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
libavformat/daud.c
View file @
b7f2fdde
...
...
@@ -60,7 +60,7 @@ static int daud_write_packet(struct AVFormatContext *s, AVPacket *pkt)
avio_wb16
(
s
->
pb
,
pkt
->
size
);
avio_wb16
(
s
->
pb
,
0x8010
);
// unknown
avio_write
(
s
->
pb
,
pkt
->
data
,
pkt
->
size
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
libavformat/dvenc.c
View file @
b7f2fdde
...
...
@@ -382,7 +382,7 @@ static int dv_write_packet(struct AVFormatContext *s, AVPacket *pkt)
pkt
->
data
,
pkt
->
size
,
&
frame
);
if
(
fsize
>
0
)
{
avio_write
(
s
->
pb
,
frame
,
fsize
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
}
return
0
;
}
...
...
libavformat/ffmenc.c
View file @
b7f2fdde
...
...
@@ -44,7 +44,7 @@ static void flush_packet(AVFormatContext *s)
h
|=
0x8000
;
avio_wb16
(
pb
,
h
);
avio_write
(
pb
,
ffm
->
packet
,
ffm
->
packet_end
-
ffm
->
packet
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
/* prepare next packet */
ffm
->
frame_offset
=
0
;
/* no key frame */
...
...
@@ -187,7 +187,7 @@ static int ffm_write_header(AVFormatContext *s)
while
((
avio_tell
(
pb
)
%
ffm
->
packet_size
)
!=
0
)
avio_w8
(
pb
,
0
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
/* init packet mux */
ffm
->
packet_ptr
=
ffm
->
packet
;
...
...
@@ -235,7 +235,7 @@ static int ffm_write_trailer(AVFormatContext *s)
if
(
ffm
->
packet_ptr
>
ffm
->
packet
)
flush_packet
(
s
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
libavformat/ffmetaenc.c
View file @
b7f2fdde
...
...
@@ -53,7 +53,7 @@ static int write_header(AVFormatContext *s)
avio_write
(
s
->
pb
,
ID_STRING
,
sizeof
(
ID_STRING
)
-
1
);
avio_w8
(
s
->
pb
,
'1'
);
// version
avio_w8
(
s
->
pb
,
'\n'
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
@@ -79,7 +79,7 @@ static int write_trailer(AVFormatContext *s)
write_tags
(
s
->
pb
,
ch
->
metadata
);
}
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
libavformat/filmstripenc.c
View file @
b7f2fdde
...
...
@@ -67,7 +67,7 @@ static int write_trailer(AVFormatContext *s)
avio_wb16
(
pb
,
1
/
av_q2d
(
st
->
codec
->
time_base
));
for
(
i
=
0
;
i
<
16
;
i
++
)
avio_w8
(
pb
,
0x00
);
// reserved
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
libavformat/flacenc.c
View file @
b7f2fdde
...
...
@@ -104,7 +104,7 @@ static int flac_write_trailer(struct AVFormatContext *s)
avio_seek
(
pb
,
8
,
SEEK_SET
);
avio_write
(
pb
,
streaminfo
,
FLAC_STREAMINFO_SIZE
);
avio_seek
(
pb
,
file_size
,
SEEK_SET
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
}
else
{
av_log
(
s
,
AV_LOG_WARNING
,
"unable to rewrite FLAC header.
\n
"
);
}
...
...
@@ -114,7 +114,7 @@ static int flac_write_trailer(struct AVFormatContext *s)
static
int
flac_write_packet
(
struct
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
avio_write
(
s
->
pb
,
pkt
->
data
,
pkt
->
size
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
libavformat/flvenc.c
View file @
b7f2fdde
...
...
@@ -430,7 +430,7 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
avio_wb32
(
pb
,
size
+
flags_size
+
11
);
// previous tag size
flv
->
duration
=
FFMAX
(
flv
->
duration
,
pkt
->
pts
+
flv
->
delay
+
pkt
->
duration
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
av_free
(
data
);
...
...
libavformat/framecrcenc.c
View file @
b7f2fdde
...
...
@@ -29,7 +29,7 @@ static int framecrc_write_packet(struct AVFormatContext *s, AVPacket *pkt)
snprintf
(
buf
,
sizeof
(
buf
),
"%d, %"
PRId64
", %d, 0x%08x
\n
"
,
pkt
->
stream_index
,
pkt
->
dts
,
pkt
->
size
,
crc
);
avio_write
(
s
->
pb
,
buf
,
strlen
(
buf
));
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
libavformat/gif.c
View file @
b7f2fdde
...
...
@@ -287,7 +287,7 @@ static int gif_write_header(AVFormatContext *s)
gif_image_write_header
(
pb
,
width
,
height
,
loop_count
,
NULL
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
@@ -322,7 +322,7 @@ static int gif_write_video(AVFormatContext *s,
gif_image_write_image
(
pb
,
0
,
0
,
enc
->
width
,
enc
->
height
,
buf
,
enc
->
width
*
3
,
PIX_FMT_RGB24
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
@@ -340,7 +340,7 @@ static int gif_write_trailer(AVFormatContext *s)
AVIOContext
*
pb
=
s
->
pb
;
avio_w8
(
pb
,
0x3b
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
libavformat/gxfenc.c
View file @
b7f2fdde
...
...
@@ -753,7 +753,7 @@ static int gxf_write_header(AVFormatContext *s)
gxf
->
packet_count
=
3
;
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
@@ -781,12 +781,12 @@ static int gxf_write_trailer(AVFormatContext *s)
gxf_write_map_packet
(
s
,
1
);
gxf_write_flt_packet
(
s
);
gxf_write_umf_packet
(
s
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
/* update duration in all map packets */
for
(
i
=
1
;
i
<
gxf
->
map_offsets_nb
;
i
++
)
{
avio_seek
(
pb
,
gxf
->
map_offsets
[
i
],
SEEK_SET
);
gxf_write_map_packet
(
s
,
1
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
}
avio_seek
(
pb
,
end
,
SEEK_SET
);
...
...
@@ -895,7 +895,7 @@ static int gxf_write_packet(AVFormatContext *s, AVPacket *pkt)
gxf
->
packet_count
=
0
;
}
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
libavformat/idroqenc.c
View file @
b7f2fdde
...
...
@@ -30,7 +30,7 @@ static int roq_write_header(struct AVFormatContext *s)
};
avio_write
(
s
->
pb
,
header
,
8
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
libavformat/img2.c
View file @
b7f2fdde
...
...
@@ -372,8 +372,8 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
avio_write
(
pb
[
0
],
pkt
->
data
,
ysize
);
avio_write
(
pb
[
1
],
pkt
->
data
+
ysize
,
(
pkt
->
size
-
ysize
)
/
2
);
avio_write
(
pb
[
2
],
pkt
->
data
+
ysize
+
(
pkt
->
size
-
ysize
)
/
2
,
(
pkt
->
size
-
ysize
)
/
2
);
put_flush_packet
(
pb
[
1
]);
put_flush_packet
(
pb
[
2
]);
avio_flush
(
pb
[
1
]);
avio_flush
(
pb
[
2
]);
avio_close
(
pb
[
1
]);
avio_close
(
pb
[
2
]);
}
else
{
...
...
@@ -402,7 +402,7 @@ static int write_packet(AVFormatContext *s, AVPacket *pkt)
}
avio_write
(
pb
[
0
],
pkt
->
data
,
pkt
->
size
);
}
put_flush_packet
(
pb
[
0
]);
avio_flush
(
pb
[
0
]);
if
(
!
img
->
is_pipe
)
{
avio_close
(
pb
[
0
]);
}
...
...
libavformat/ivfenc.c
View file @
b7f2fdde
...
...
@@ -53,7 +53,7 @@ static int ivf_write_packet(AVFormatContext *s, AVPacket *pkt)
avio_wl32
(
pb
,
pkt
->
size
);
avio_wl64
(
pb
,
pkt
->
pts
);
avio_write
(
pb
,
pkt
->
data
,
pkt
->
size
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
libavformat/libnut.c
View file @
b7f2fdde
...
...
@@ -48,7 +48,7 @@ static const AVCodecTag nut_tags[] = {
static
int
av_write
(
void
*
h
,
size_t
len
,
const
uint8_t
*
buf
)
{
AVIOContext
*
bc
=
h
;
avio_write
(
bc
,
buf
,
len
);
//
put_flush_packet
(bc);
//
avio_flush
(bc);
return
len
;
}
...
...
@@ -142,7 +142,7 @@ static int nut_write_trailer(AVFormatContext * avf) {
int
i
;
nut_muxer_uninit_reorder
(
priv
->
nut
);
put_flush_packet
(
bc
);
avio_flush
(
bc
);
for
(
i
=
0
;
priv
->
s
[
i
].
type
!=
-
1
;
i
++
)
av_freep
(
&
priv
->
s
[
i
].
fourcc
);
av_freep
(
&
priv
->
s
);
...
...
libavformat/matroskaenc.c
View file @
b7f2fdde
...
...
@@ -873,7 +873,7 @@ static int mkv_write_header(AVFormatContext *s)
mkv
->
cur_audio_pkt
.
size
=
0
;
mkv
->
audio_buffer_size
=
0
;
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
@@ -1172,7 +1172,7 @@ static int mkv_write_trailer(AVFormatContext *s)
end_ebml_master
(
pb
,
mkv
->
segment
);
av_free
(
mkv
->
tracks
);
av_destruct_packet
(
&
mkv
->
cur_audio_pkt
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
libavformat/md5enc.c
View file @
b7f2fdde
...
...
@@ -37,7 +37,7 @@ static void md5_finish(struct AVFormatContext *s, char *buf)
buf
[
offset
+
1
]
=
0
;
avio_write
(
s
->
pb
,
buf
,
strlen
(
buf
));
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
}
#if CONFIG_MD5_MUXER
...
...
libavformat/mmf.c
View file @
b7f2fdde
...
...
@@ -102,7 +102,7 @@ static int mmf_write_header(AVFormatContext *s)
av_set_pts_info
(
s
->
streams
[
0
],
64
,
1
,
s
->
streams
[
0
]
->
codec
->
sample_rate
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
@@ -160,7 +160,7 @@ static int mmf_write_trailer(AVFormatContext *s)
avio_seek
(
pb
,
pos
,
SEEK_SET
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
}
return
0
;
}
...
...
libavformat/movenc.c
View file @
b7f2fdde
...
...
@@ -2042,7 +2042,7 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
trk
->
sampleCount
+=
samplesInChunk
;
mov
->
mdat_size
+=
size
;
put_flush_packet
(
pb
);
avio_flush
(
pb
);
if
(
trk
->
hint_track
>=
0
&&
trk
->
hint_track
<
mov
->
nb_streams
)
ff_mov_add_hinted_packet
(
s
,
pkt
,
trk
->
hint_track
,
trk
->
entry
);
...
...
@@ -2227,7 +2227,7 @@ static int mov_write_header(AVFormatContext *s)
}
}
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
error
:
...
...
@@ -2271,7 +2271,7 @@ static int mov_write_trailer(AVFormatContext *s)
}
put_flush_packet
(
pb
);
avio_flush
(
pb
);
av_freep
(
&
mov
->
tracks
);
...
...
libavformat/mp3enc.c
View file @
b7f2fdde
...
...
@@ -133,7 +133,7 @@ static int mp3_write_trailer(struct AVFormatContext *s)
/* write the id3v1 tag */
if
(
id3v1_create_tag
(
s
,
buf
)
>
0
)
{
avio_write
(
s
->
pb
,
buf
,
ID3v1_TAG_SIZE
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
}
return
0
;
}
...
...
libavformat/mpegenc.c
View file @
b7f2fdde
...
...
@@ -936,7 +936,7 @@ static int flush_packet(AVFormatContext *ctx, int stream_index,
for
(
i
=
0
;
i
<
zero_trail_bytes
;
i
++
)
avio_w8
(
ctx
->
pb
,
0x00
);
put_flush_packet
(
ctx
->
pb
);
avio_flush
(
ctx
->
pb
);
s
->
packet_number
++
;
...
...
@@ -965,7 +965,7 @@ static void put_vcd_padding_sector(AVFormatContext *ctx)
s
->
vcd_padding_bytes_written
+=
s
->
packet_size
;
put_flush_packet
(
ctx
->
pb
);
avio_flush
(
ctx
->
pb
);
/* increasing the packet number is correct. The SCR of the following packs
is calculated from the packet_number and it has to include the padding
...
...
@@ -1221,7 +1221,7 @@ static int mpeg_mux_end(AVFormatContext *ctx)
it as it is usually not needed by decoders and because it
complicates MPEG stream concatenation. */
//avio_wb32(ctx->pb, ISO_11172_END_CODE);
//
put_flush_packet
(ctx->pb);
//
avio_flush
(ctx->pb);
for
(
i
=
0
;
i
<
ctx
->
nb_streams
;
i
++
)
{
stream
=
ctx
->
streams
[
i
]
->
priv_data
;
...
...
libavformat/mpegtsenc.c
View file @
b7f2fdde
...
...
@@ -579,7 +579,7 @@ static int mpegts_write_header(AVFormatContext *s)
service
->
pcr_packet_period
,
ts
->
sdt_packet_period
,
ts
->
pat_packet_period
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
...
...
@@ -865,7 +865,7 @@ static void mpegts_write_pes(AVFormatContext *s, AVStream *st,
payload_size
-=
len
;
avio_write
(
s
->
pb
,
buf
,
TS_PACKET_SIZE
);
}
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
}
static
int
mpegts_write_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
...
...
@@ -988,7 +988,7 @@ static int mpegts_write_end(AVFormatContext *s)
}
av_freep
(
&
ts_st
->
adts
);
}
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
for
(
i
=
0
;
i
<
ts
->
nb_services
;
i
++
)
{
service
=
ts
->
services
[
i
];
...
...
libavformat/mpjpeg.c
View file @
b7f2fdde
...
...
@@ -30,7 +30,7 @@ static int mpjpeg_write_header(AVFormatContext *s)
snprintf
(
buf1
,
sizeof
(
buf1
),
"--%s
\n
"
,
BOUNDARY_TAG
);
avio_write
(
s
->
pb
,
buf1
,
strlen
(
buf1
));
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
@@ -44,7 +44,7 @@ static int mpjpeg_write_packet(AVFormatContext *s, AVPacket *pkt)
snprintf
(
buf1
,
sizeof
(
buf1
),
"
\n
--%s
\n
"
,
BOUNDARY_TAG
);
avio_write
(
s
->
pb
,
buf1
,
strlen
(
buf1
));
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
libavformat/mxfenc.c
View file @
b7f2fdde
...
...
@@ -1272,7 +1272,7 @@ static void mxf_write_partition(AVFormatContext *s, int bodysid,
avio_seek
(
pb
,
pos
,
SEEK_SET
);
}
put_flush_packet
(
pb
);
avio_flush
(
pb
);
}
static
const
UID
mxf_mpeg2_codec_uls
[]
=
{
...
...
@@ -1731,7 +1731,7 @@ static int mxf_write_packet(AVFormatContext *s, AVPacket *pkt)
mxf
->
body_offset
+=
16
+
4
+
pkt
->
size
+
klv_fill_size
(
16
+
4
+
pkt
->
size
);
}
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
@@ -1795,7 +1795,7 @@ static int mxf_write_footer(AVFormatContext *s)
}
}
put_flush_packet
(
pb
);
avio_flush
(
pb
);
ff_audio_interleave_close
(
s
);
...
...
libavformat/nutenc.c
View file @
b7f2fdde
...
...
@@ -639,7 +639,7 @@ static int write_header(AVFormatContext *s){
if
((
ret
=
write_headers
(
s
,
bc
))
<
0
)
return
ret
;
put_flush_packet
(
bc
);
avio_flush
(
bc
);
//FIXME index
...
...
@@ -843,7 +843,7 @@ static int write_trailer(AVFormatContext *s){
while
(
nut
->
header_count
<
3
)
write_headers
(
s
,
bc
);
put_flush_packet
(
bc
);
avio_flush
(
bc
);
ff_nut_free_sp
(
nut
);
av_freep
(
&
nut
->
stream
);
av_freep
(
&
nut
->
time_base
);
...
...
libavformat/oggenc.c
View file @
b7f2fdde
...
...
@@ -99,14 +99,14 @@ static int ogg_write_page(AVFormatContext *s, OGGPage *page, int extra_flags)
avio_write
(
pb
,
page
->
data
,
page
->
size
);
ogg_update_checksum
(
s
,
pb
,
crc_offset
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
size
=
url_close_dyn_buf
(
pb
,
&
buf
);
if
(
size
<
0
)
return
size
;
avio_write
(
s
->
pb
,
buf
,
size
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
av_free
(
buf
);
oggstream
->
page_count
--
;
return
0
;
...
...
libavformat/rawenc.c
View file @
b7f2fdde
...
...
@@ -26,7 +26,7 @@
int
ff_raw_write_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
avio_write
(
s
->
pb
,
pkt
->
data
,
pkt
->
size
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
libavformat/rmenc.c
View file @
b7f2fdde
...
...
@@ -341,7 +341,7 @@ static int rm_write_header(AVFormatContext *s)
if
(
rv10_write_header
(
s
,
0
,
0
))
return
AVERROR_INVALIDDATA
;
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
@@ -368,7 +368,7 @@ static int rm_write_audio(AVFormatContext *s, const uint8_t *buf, int size, int
}
else
{
avio_write
(
pb
,
buf
,
size
);
}
put_flush_packet
(
pb
);
avio_flush
(
pb
);
stream
->
nb_frames
++
;
av_free
(
buf1
);
return
0
;
...
...
@@ -413,7 +413,7 @@ static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size, int
avio_w8
(
pb
,
stream
->
nb_frames
&
0xff
);
avio_write
(
pb
,
buf
,
size
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
stream
->
nb_frames
++
;
return
0
;
...
...
@@ -454,7 +454,7 @@ static int rm_write_trailer(AVFormatContext *s)
avio_wb32
(
pb
,
0
);
avio_wb32
(
pb
,
0
);
}
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
libavformat/rsoenc.c
View file @
b7f2fdde
...
...
@@ -60,7 +60,7 @@ static int rso_write_header(AVFormatContext *s)
avio_wb16
(
pb
,
enc
->
sample_rate
);
avio_wb16
(
pb
,
0x0000
);
/* play mode ? (0x0000 = don't loop) */
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
@@ -95,7 +95,7 @@ static int rso_write_trailer(AVFormatContext *s)
avio_wb16
(
pb
,
coded_file_size
);
avio_seek
(
pb
,
file_size
,
SEEK_SET
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
libavformat/rtpdec.c
View file @
b7f2fdde
...
...
@@ -320,7 +320,7 @@ int rtp_check_and_send_back_rr(RTPDemuxContext *s, int count)
avio_w8
(
pb
,
0
);
}
put_flush_packet
(
pb
);
avio_flush
(
pb
);
len
=
url_close_dyn_buf
(
pb
,
&
buf
);
if
((
len
>
0
)
&&
buf
)
{
int
result
;
...
...
@@ -348,7 +348,7 @@ void rtp_send_punch_packets(URLContext* rtp_handle)
avio_wb32
(
pb
,
0
);
/* Timestamp */
avio_wb32
(
pb
,
0
);
/* SSRC */
put_flush_packet
(
pb
);
avio_flush
(
pb
);
len
=
url_close_dyn_buf
(
pb
,
&
buf
);
if
((
len
>
0
)
&&
buf
)
url_write
(
rtp_handle
,
buf
,
len
);
...
...
@@ -363,7 +363,7 @@ void rtp_send_punch_packets(URLContext* rtp_handle)
avio_wb16
(
pb
,
1
);
/* length in words - 1 */
avio_wb32
(
pb
,
0
);
/* our own SSRC */
put_flush_packet
(
pb
);
avio_flush
(
pb
);
len
=
url_close_dyn_buf
(
pb
,
&
buf
);
if
((
len
>
0
)
&&
buf
)
url_write
(
rtp_handle
,
buf
,
len
);
...
...
libavformat/rtpenc.c
View file @
b7f2fdde
...
...
@@ -206,7 +206,7 @@ static void rtcp_send_sr(AVFormatContext *s1, int64_t ntp_time)
avio_wb32
(
s1
->
pb
,
rtp_ts
);
avio_wb32
(
s1
->
pb
,
s
->
packet_count
);
avio_wb32
(
s1
->
pb
,
s
->
octet_count
);
put_flush_packet
(
s1
->
pb
);
avio_flush
(
s1
->
pb
);
}
/* send an rtp packet. sequence number is incremented, but the caller
...
...
@@ -225,7 +225,7 @@ void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m)
avio_wb32
(
s1
->
pb
,
s
->
ssrc
);
avio_write
(
s1
->
pb
,
buf1
,
len
);
put_flush_packet
(
s1
->
pb
);
avio_flush
(
s1
->
pb
);
s
->
seq
++
;
s
->
octet_count
+=
len
;
...
...
libavformat/soxenc.c
View file @
b7f2fdde
...
...
@@ -78,7 +78,7 @@ static int sox_write_header(AVFormatContext *s)
for
(
;
comment_size
>
comment_len
;
comment_len
++
)
avio_w8
(
pb
,
0
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
@@ -107,7 +107,7 @@ static int sox_write_trailer(AVFormatContext *s)
avio_wb64
(
pb
,
num_samples
);
avio_seek
(
pb
,
file_size
,
SEEK_SET
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
}
return
0
;
...
...
libavformat/spdifenc.c
View file @
b7f2fdde
...
...
@@ -531,7 +531,7 @@ static int spdif_write_packet(struct AVFormatContext *s, AVPacket *pkt)
av_log
(
s
,
AV_LOG_DEBUG
,
"type=%x len=%i pkt_offset=%i
\n
"
,
ctx
->
data_type
,
ctx
->
out_bytes
,
ctx
->
pkt_offset
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
libavformat/swfenc.c
View file @
b7f2fdde
...
...
@@ -326,7 +326,7 @@ static int swf_write_header(AVFormatContext *s)
put_swf_end_tag
(
s
);
}
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
@@ -432,7 +432,7 @@ static int swf_write_video(AVFormatContext *s,
put_swf_tag
(
s
,
TAG_SHOWFRAME
);
put_swf_end_tag
(
s
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
return
0
;
}
...
...
@@ -489,7 +489,7 @@ static int swf_write_trailer(AVFormatContext *s)
put_swf_tag
(
s
,
TAG_END
);
put_swf_end_tag
(
s
);
put_flush_packet
(
s
->
pb
);
avio_flush
(
s
->
pb
);
/* patch file size and number of frames if not streamed */
if
(
!
url_is_streamed
(
s
->
pb
)
&&
video_enc
)
{
...
...
libavformat/vc1testenc.c
View file @
b7f2fdde
...
...
@@ -62,7 +62,7 @@ static int vc1test_write_packet(AVFormatContext *s, AVPacket *pkt)
avio_wl32
(
pb
,
pkt
->
size
|
((
pkt
->
flags
&
AV_PKT_FLAG_KEY
)
?
0x80000000
:
0
));
avio_wl32
(
pb
,
pkt
->
pts
);
avio_write
(
pb
,
pkt
->
data
,
pkt
->
size
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
ctx
->
frames
++
;
return
0
;
...
...
@@ -76,7 +76,7 @@ static int vc1test_write_trailer(AVFormatContext *s)
if
(
!
url_is_streamed
(
s
->
pb
))
{
avio_seek
(
pb
,
0
,
SEEK_SET
);
avio_wl24
(
pb
,
ctx
->
frames
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
}
return
0
;
}
...
...
libavformat/wav.c
View file @
b7f2fdde
...
...
@@ -71,7 +71,7 @@ static int wav_write_header(AVFormatContext *s)
/* data header */
wav
->
data
=
ff_start_tag
(
pb
,
"data"
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
@@ -96,7 +96,7 @@ static int wav_write_trailer(AVFormatContext *s)
WAVContext
*
wav
=
s
->
priv_data
;
int64_t
file_size
;
put_flush_packet
(
pb
);
avio_flush
(
pb
);
if
(
!
url_is_streamed
(
s
->
pb
))
{
ff_end_tag
(
pb
,
wav
->
data
);
...
...
@@ -107,7 +107,7 @@ static int wav_write_trailer(AVFormatContext *s)
avio_wl32
(
pb
,
(
uint32_t
)(
file_size
-
8
));
avio_seek
(
pb
,
file_size
,
SEEK_SET
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
if
(
s
->
streams
[
0
]
->
codec
->
codec_tag
!=
0x01
)
{
/* Update num_samps in fact chunk */
...
...
@@ -118,7 +118,7 @@ static int wav_write_trailer(AVFormatContext *s)
avio_seek
(
pb
,
wav
->
data
-
12
,
SEEK_SET
);
avio_wl32
(
pb
,
number_of_samples
);
avio_seek
(
pb
,
file_size
,
SEEK_SET
);
put_flush_packet
(
pb
);
avio_flush
(
pb
);
}
}
return
0
;
...
...
libavformat/yuv4mpeg.c
View file @
b7f2fdde
...
...
@@ -143,7 +143,7 @@ static int yuv4_write_packet(AVFormatContext *s, AVPacket *pkt)
ptr2
+=
picture
->
linesize
[
2
];
}
}
put_flush_packet
(
pb
);
avio_flush
(
pb
);
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment