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
92f630ea
Commit
92f630ea
authored
Dec 09, 2012
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add forgotten AV_ prefix to some CODEC_IDs
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
7f012475
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
34 deletions
+34
-34
srtdec.c
libavcodec/srtdec.c
+1
-1
srtenc.c
libavcodec/srtenc.c
+2
-2
icoenc.c
libavformat/icoenc.c
+6
-6
ircam.c
libavformat/ircam.c
+18
-18
riff.c
libavformat/riff.c
+5
-5
vivo.c
libavformat/vivo.c
+2
-2
No files found.
libavcodec/srtdec.c
View file @
92f630ea
...
...
@@ -234,7 +234,7 @@ static int srt_decode_frame(AVCodecContext *avctx,
return
avpkt
->
size
;
while
(
ptr
<
end
&&
*
ptr
)
{
if
(
avctx
->
codec
->
id
==
CODEC_ID_SRT
)
{
if
(
avctx
->
codec
->
id
==
AV_
CODEC_ID_SRT
)
{
ptr
=
read_ts
(
ptr
,
&
ts_start
,
&
ts_end
,
&
x1
,
&
y1
,
&
x2
,
&
y2
);
if
(
!
ptr
)
break
;
...
...
libavcodec/srtenc.c
View file @
92f630ea
...
...
@@ -204,7 +204,7 @@ static void srt_move_cb(void *priv, int x1, int y1, int x2, int y2,
{
SRTContext
*
s
=
priv
;
if
(
s
->
avctx
->
codec
->
id
==
CODEC_ID_SRT
)
{
if
(
s
->
avctx
->
codec
->
id
==
AV_
CODEC_ID_SRT
)
{
char
buffer
[
32
];
int
len
=
snprintf
(
buffer
,
sizeof
(
buffer
),
" X1:%03u X2:%03u Y1:%03u Y2:%03u"
,
x1
,
x2
,
y1
,
y2
);
...
...
@@ -254,7 +254,7 @@ static int srt_encode_frame(AVCodecContext *avctx,
dialog
=
ff_ass_split_dialog
(
s
->
ass_ctx
,
sub
->
rects
[
i
]
->
ass
,
0
,
&
num
);
for
(;
dialog
&&
num
--
;
dialog
++
)
{
if
(
avctx
->
codec
->
id
==
CODEC_ID_SRT
)
{
if
(
avctx
->
codec
->
id
==
AV_
CODEC_ID_SRT
)
{
int
sh
,
sm
,
ss
,
sc
=
10
*
dialog
->
start
;
int
eh
,
em
,
es
,
ec
=
10
*
dialog
->
end
;
sh
=
sc
/
3600000
;
sc
-=
3600000
*
sh
;
...
...
libavformat/icoenc.c
View file @
92f630ea
...
...
@@ -44,7 +44,7 @@ typedef struct {
static
int
ico_check_attributes
(
AVFormatContext
*
s
,
const
AVCodecContext
*
c
)
{
if
(
c
->
codec_id
==
CODEC_ID_BMP
)
{
if
(
c
->
codec_id
==
AV_
CODEC_ID_BMP
)
{
if
(
c
->
pix_fmt
==
AV_PIX_FMT_PAL8
&&
AV_PIX_FMT_RGB32
!=
AV_PIX_FMT_BGRA
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"Wrong endianness for bmp pixel format
\n
"
);
return
AVERROR
(
EINVAL
);
...
...
@@ -55,7 +55,7 @@ static int ico_check_attributes(AVFormatContext *s, const AVCodecContext *c)
av_log
(
s
,
AV_LOG_ERROR
,
"BMP must be 1bit, 4bit, 8bit, 16bit, 24bit, or 32bit
\n
"
);
return
AVERROR
(
EINVAL
);
}
}
else
if
(
c
->
codec_id
==
CODEC_ID_PNG
)
{
}
else
if
(
c
->
codec_id
==
AV_
CODEC_ID_PNG
)
{
if
(
c
->
pix_fmt
!=
AV_PIX_FMT_RGBA
)
{
av_log
(
s
,
AV_LOG_ERROR
,
"PNG in ico requires pixel format to be rgba
\n
"
);
return
AVERROR
(
EINVAL
);
...
...
@@ -129,7 +129,7 @@ static int ico_write_packet(AVFormatContext *s, AVPacket *pkt)
image
->
width
=
(
c
->
width
==
256
)
?
0
:
c
->
width
;
image
->
height
=
(
c
->
height
==
256
)
?
0
:
c
->
height
;
if
(
c
->
codec_id
==
CODEC_ID_PNG
)
{
if
(
c
->
codec_id
==
AV_
CODEC_ID_PNG
)
{
image
->
bits
=
c
->
bits_per_coded_sample
;
image
->
size
=
pkt
->
size
;
...
...
@@ -170,7 +170,7 @@ static int ico_write_trailer(AVFormatContext *s)
avio_w8
(
pb
,
ico
->
images
[
i
].
width
);
avio_w8
(
pb
,
ico
->
images
[
i
].
height
);
if
(
s
->
streams
[
i
]
->
codec
->
codec_id
==
CODEC_ID_BMP
&&
if
(
s
->
streams
[
i
]
->
codec
->
codec_id
==
AV_
CODEC_ID_BMP
&&
s
->
streams
[
i
]
->
codec
->
pix_fmt
==
AV_PIX_FMT_PAL8
)
{
avio_w8
(
pb
,
(
ico
->
images
[
i
].
bits
>=
8
)
?
0
:
1
<<
ico
->
images
[
i
].
bits
);
}
else
{
...
...
@@ -195,8 +195,8 @@ AVOutputFormat ff_ico_muxer = {
.
priv_data_size
=
sizeof
(
IcoMuxContext
),
.
mime_type
=
"image/vnd.microsoft.icon"
,
.
extensions
=
"ico"
,
.
audio_codec
=
CODEC_ID_NONE
,
.
video_codec
=
CODEC_ID_BMP
,
.
audio_codec
=
AV_
CODEC_ID_NONE
,
.
video_codec
=
AV_
CODEC_ID_BMP
,
.
write_header
=
ico_write_header
,
.
write_packet
=
ico_write_packet
,
.
write_trailer
=
ico_write_trailer
,
...
...
libavformat/ircam.c
View file @
92f630ea
...
...
@@ -23,25 +23,25 @@
#include "internal.h"
const
AVCodecTag
ff_codec_ircam_le_tags
[]
=
{
{
CODEC_ID_PCM_ALAW
,
0x10001
},
{
CODEC_ID_PCM_F32LE
,
0x00004
},
{
CODEC_ID_PCM_F64LE
,
0x00008
},
{
CODEC_ID_PCM_MULAW
,
0x20001
},
{
CODEC_ID_PCM_S16LE
,
0x00002
},
{
CODEC_ID_PCM_S24LE
,
0x00003
},
{
CODEC_ID_PCM_S32LE
,
0x40004
},
{
CODEC_ID_PCM_S8
,
0x00001
},
{
CODEC_ID_NONE
,
0
},
{
AV_
CODEC_ID_PCM_ALAW
,
0x10001
},
{
AV_
CODEC_ID_PCM_F32LE
,
0x00004
},
{
AV_
CODEC_ID_PCM_F64LE
,
0x00008
},
{
AV_
CODEC_ID_PCM_MULAW
,
0x20001
},
{
AV_
CODEC_ID_PCM_S16LE
,
0x00002
},
{
AV_
CODEC_ID_PCM_S24LE
,
0x00003
},
{
AV_
CODEC_ID_PCM_S32LE
,
0x40004
},
{
AV_
CODEC_ID_PCM_S8
,
0x00001
},
{
AV_
CODEC_ID_NONE
,
0
},
};
const
AVCodecTag
ff_codec_ircam_be_tags
[]
=
{
{
CODEC_ID_PCM_ALAW
,
0x10001
},
{
CODEC_ID_PCM_F32BE
,
0x00004
},
{
CODEC_ID_PCM_F64BE
,
0x00008
},
{
CODEC_ID_PCM_MULAW
,
0x20001
},
{
CODEC_ID_PCM_S16BE
,
0x00002
},
{
CODEC_ID_PCM_S24BE
,
0x00003
},
{
CODEC_ID_PCM_S32BE
,
0x40004
},
{
CODEC_ID_PCM_S8
,
0x00001
},
{
CODEC_ID_NONE
,
0
},
{
AV_
CODEC_ID_PCM_ALAW
,
0x10001
},
{
AV_
CODEC_ID_PCM_F32BE
,
0x00004
},
{
AV_
CODEC_ID_PCM_F64BE
,
0x00008
},
{
AV_
CODEC_ID_PCM_MULAW
,
0x20001
},
{
AV_
CODEC_ID_PCM_S16BE
,
0x00002
},
{
AV_
CODEC_ID_PCM_S24BE
,
0x00003
},
{
AV_
CODEC_ID_PCM_S32BE
,
0x40004
},
{
AV_
CODEC_ID_PCM_S8
,
0x00001
},
{
AV_
CODEC_ID_NONE
,
0
},
};
libavformat/riff.c
View file @
92f630ea
...
...
@@ -462,11 +462,11 @@ int ff_put_wav_header(AVIOContext *pb, AVCodecContext *enc)
}
avio_wl16
(
pb
,
enc
->
channels
);
avio_wl32
(
pb
,
enc
->
sample_rate
);
if
(
enc
->
codec_id
==
CODEC_ID_ATRAC3
||
enc
->
codec_id
==
CODEC_ID_G723_1
||
enc
->
codec_id
==
CODEC_ID_GSM_MS
||
enc
->
codec_id
==
CODEC_ID_MP2
||
enc
->
codec_id
==
CODEC_ID_MP3
)
{
if
(
enc
->
codec_id
==
AV_
CODEC_ID_ATRAC3
||
enc
->
codec_id
==
AV_
CODEC_ID_G723_1
||
enc
->
codec_id
==
AV_
CODEC_ID_GSM_MS
||
enc
->
codec_id
==
AV_
CODEC_ID_MP2
||
enc
->
codec_id
==
AV_
CODEC_ID_MP3
)
{
bps
=
0
;
}
else
{
if
(
!
(
bps
=
av_get_bits_per_sample
(
enc
->
codec_id
)))
{
...
...
libavformat/vivo.c
View file @
92f630ea
...
...
@@ -226,8 +226,8 @@ static int vivo_read_header(AVFormatContext *s)
vst
->
codec
->
codec_type
=
AVMEDIA_TYPE_VIDEO
;
if
(
vivo
->
version
==
1
)
{
vst
->
codec
->
codec_id
=
CODEC_ID_H263
;
ast
->
codec
->
codec_id
=
CODEC_ID_G723_1
;
vst
->
codec
->
codec_id
=
AV_
CODEC_ID_H263
;
ast
->
codec
->
codec_id
=
AV_
CODEC_ID_G723_1
;
ast
->
codec
->
bits_per_coded_sample
=
8
;
ast
->
codec
->
block_align
=
24
;
ast
->
codec
->
bit_rate
=
6400
;
...
...
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