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
f3298f12
Commit
f3298f12
authored
Dec 23, 2012
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Return proper error code after av_log_ask_for_sample()
parent
ed40b6bf
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
19 additions
and
19 deletions
+19
-19
anm.c
libavcodec/anm.c
+1
-1
cinepak.c
libavcodec/cinepak.c
+1
-1
h264.c
libavcodec/h264.c
+1
-1
pictordec.c
libavcodec/pictordec.c
+1
-1
ptx.c
libavcodec/ptx.c
+1
-1
truemotion1.c
libavcodec/truemotion1.c
+1
-1
truespeech.c
libavcodec/truespeech.c
+1
-1
wmalosslessdec.c
libavcodec/wmalosslessdec.c
+1
-1
wmaprodec.c
libavcodec/wmaprodec.c
+3
-3
anm.c
libavformat/anm.c
+2
-2
au.c
libavformat/au.c
+1
-1
filmstripdec.c
libavformat/filmstripdec.c
+1
-1
mtv.c
libavformat/mtv.c
+1
-1
rsodec.c
libavformat/rsodec.c
+1
-1
smjpegdec.c
libavformat/smjpegdec.c
+1
-1
spdifenc.c
libavformat/spdifenc.c
+1
-1
No files found.
libavcodec/anm.c
View file @
f3298f12
...
...
@@ -158,7 +158,7 @@ static int decode_frame(AVCodecContext *avctx,
break
;
// stop
if
(
type
==
2
)
{
av_log_ask_for_sample
(
avctx
,
"unknown opcode"
);
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
continue
;
}
...
...
libavcodec/cinepak.c
View file @
f3298f12
...
...
@@ -334,7 +334,7 @@ static int cinepak_decode (CinepakContext *s)
if
(
s
->
sega_film_skip_bytes
==
-
1
)
{
if
(
!
encoded_buf_size
)
{
av_log_ask_for_sample
(
s
->
avctx
,
"encoded_buf_size is 0"
);
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
if
(
encoded_buf_size
!=
s
->
size
&&
(
s
->
size
%
encoded_buf_size
)
!=
0
)
{
/* If the encoded frame size differs from the frame size as indicated
...
...
libavcodec/h264.c
View file @
f3298f12
...
...
@@ -2873,7 +2873,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0)
av_log_ask_for_sample
(
s
->
avctx
,
NULL
);
s
->
picture_structure
=
last_pic_structure
;
s
->
droppable
=
last_pic_droppable
;
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
/* Take ownership of this buffer. Note that if another thread owned
...
...
libavcodec/pictordec.c
View file @
f3298f12
...
...
@@ -123,7 +123,7 @@ static int decode_frame(AVCodecContext *avctx,
bpp
=
bits_per_plane
*
s
->
nb_planes
;
if
(
bits_per_plane
>
8
||
bpp
<
1
||
bpp
>
32
)
{
av_log_ask_for_sample
(
s
,
"unsupported bit depth
\n
"
);
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
if
(
bytestream2_peek_byte
(
&
s
->
g
)
==
0xFF
)
{
...
...
libavcodec/ptx.c
View file @
f3298f12
...
...
@@ -57,7 +57,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
if
(
bytes_per_pixel
!=
2
)
{
av_log_ask_for_sample
(
avctx
,
"Image format is not RGB15.
\n
"
);
return
-
1
;
return
AVERROR_PATCHWELCOME
;
}
avctx
->
pix_fmt
=
AV_PIX_FMT_RGB555
;
...
...
libavcodec/truemotion1.c
View file @
f3298f12
...
...
@@ -356,7 +356,7 @@ static int truemotion1_decode_header(TrueMotion1Context *s)
if
(
s
->
flags
&
FLAG_SPRITE
)
{
av_log_ask_for_sample
(
s
->
avctx
,
"SPRITE frame found.
\n
"
);
/* FIXME header.width, height, xoffset and yoffset aren't initialized */
return
-
1
;
return
AVERROR_PATCHWELCOME
;
}
else
{
s
->
w
=
header
.
xsize
;
s
->
h
=
header
.
ysize
;
...
...
libavcodec/truespeech.c
View file @
f3298f12
...
...
@@ -65,7 +65,7 @@ static av_cold int truespeech_decode_init(AVCodecContext * avctx)
if
(
avctx
->
channels
!=
1
)
{
av_log_ask_for_sample
(
avctx
,
"Unsupported channel count: %d
\n
"
,
avctx
->
channels
);
return
AVERROR
(
EINVAL
)
;
return
AVERROR
_PATCHWELCOME
;
}
avctx
->
channel_layout
=
AV_CH_LAYOUT_MONO
;
...
...
libavcodec/wmalosslessdec.c
View file @
f3298f12
...
...
@@ -203,7 +203,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
}
else
{
av_log_ask_for_sample
(
avctx
,
"Unsupported extradata size
\n
"
);
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
/* generic init */
...
...
libavcodec/wmaprodec.c
View file @
f3298f12
...
...
@@ -299,7 +299,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
}
else
{
av_log_ask_for_sample
(
avctx
,
"Unknown extradata size
\n
"
);
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
/** generic init */
...
...
@@ -680,7 +680,7 @@ static int decode_channel_transform(WMAProDecodeCtx* s)
if
(
get_bits1
(
&
s
->
gb
))
{
av_log_ask_for_sample
(
s
->
avctx
,
"unsupported channel transform bit
\n
"
);
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
for
(
s
->
num_chgroups
=
0
;
remaining_channels
&&
...
...
@@ -1150,7 +1150,7 @@ static int decode_subframe(WMAProDecodeCtx *s)
/** no idea for what the following bit is used */
if
(
get_bits1
(
&
s
->
gb
))
{
av_log_ask_for_sample
(
s
->
avctx
,
"reserved bit set
\n
"
);
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
...
...
libavformat/anm.c
View file @
f3298f12
...
...
@@ -86,7 +86,7 @@ static int read_header(AVFormatContext *s)
avio_skip
(
pb
,
4
);
/* magic number */
if
(
avio_rl16
(
pb
)
!=
MAX_PAGES
)
{
av_log_ask_for_sample
(
s
,
"max_pages != "
AV_STRINGIFY
(
MAX_PAGES
)
"
\n
"
);
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
anm
->
nb_pages
=
avio_rl16
(
pb
);
...
...
@@ -166,7 +166,7 @@ static int read_header(AVFormatContext *s)
invalid:
av_log_ask_for_sample
(
s
,
NULL
);
ret
=
AVERROR_
INVALIDDATA
;
ret
=
AVERROR_
PATCHWELCOME
;
fail:
return
ret
;
...
...
libavformat/au.c
View file @
f3298f12
...
...
@@ -82,7 +82,7 @@ static int au_read_header(AVFormatContext *s)
if
(
!
av_get_bits_per_sample
(
codec
))
{
av_log_ask_for_sample
(
s
,
"could not determine bits per sample
\n
"
);
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
if
(
channels
==
0
||
channels
>
64
)
{
...
...
libavformat/filmstripdec.c
View file @
f3298f12
...
...
@@ -56,7 +56,7 @@ static int read_header(AVFormatContext *s)
st
->
nb_frames
=
avio_rb32
(
pb
);
if
(
avio_rb16
(
pb
)
!=
0
)
{
av_log_ask_for_sample
(
s
,
"unsupported packing method
\n
"
);
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
avio_skip
(
pb
,
2
);
...
...
libavformat/mtv.c
View file @
f3298f12
...
...
@@ -109,7 +109,7 @@ static int mtv_read_header(AVFormatContext *s)
if
(
audio_subsegments
==
0
)
{
av_log_ask_for_sample
(
s
,
"MTV files without audio are not supported
\n
"
);
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
mtv
->
full_segment_size
=
...
...
libavformat/rsodec.c
View file @
f3298f12
...
...
@@ -50,7 +50,7 @@ static int rso_read_header(AVFormatContext *s)
bps
=
av_get_bits_per_sample
(
codec
);
if
(
!
bps
)
{
av_log_ask_for_sample
(
s
,
"could not determine bits per sample
\n
"
);
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
/* now we are ready: build format streams */
...
...
libavformat/smjpegdec.c
View file @
f3298f12
...
...
@@ -78,7 +78,7 @@ static int smjpeg_read_header(AVFormatContext *s)
case
SMJPEG_SND
:
if
(
ast
)
{
av_log_ask_for_sample
(
s
,
"multiple audio streams not supported
\n
"
);
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
hlength
=
avio_rb32
(
pb
);
if
(
hlength
<
8
)
...
...
libavformat/spdifenc.c
View file @
f3298f12
...
...
@@ -414,7 +414,7 @@ static int spdif_header_truehd(AVFormatContext *s, AVPacket *pkt)
* distribute the TrueHD frames in the MAT frame */
av_log
(
s
,
AV_LOG_ERROR
,
"TrueHD frame too big, %d bytes
\n
"
,
pkt
->
size
);
av_log_ask_for_sample
(
s
,
NULL
);
return
AVERROR_
INVALIDDATA
;
return
AVERROR_
PATCHWELCOME
;
}
memcpy
(
&
ctx
->
hd_buf
[
ctx
->
hd_buf_count
*
TRUEHD_FRAME_OFFSET
-
BURST_HEADER_SIZE
+
mat_code_length
],
...
...
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