Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
5b9c3b45
F
Ffmpeg
项目概览
小白菜888
/
Ffmpeg
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
Ffmpeg
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5b9c3b45
编写于
11月 09, 2013
作者:
A
Anton Khirnov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace all instances of avcodec_alloc_frame() with av_frame_alloc().
上级
2ff302cb
变更
18
隐藏空白更改
内联
并排
Showing
18 changed file
with
23 addition
and
23 deletion
+23
-23
avconv.c
avconv.c
+2
-2
avplay.c
avplay.c
+1
-1
libavcodec/alacenc.c
libavcodec/alacenc.c
+1
-1
libavcodec/api-example.c
libavcodec/api-example.c
+4
-4
libavcodec/libopenjpegenc.c
libavcodec/libopenjpegenc.c
+1
-1
libavcodec/libtheoraenc.c
libavcodec/libtheoraenc.c
+1
-1
libavcodec/libvpxenc.c
libavcodec/libvpxenc.c
+1
-1
libavcodec/pcm.c
libavcodec/pcm.c
+1
-1
libavcodec/proresenc.c
libavcodec/proresenc.c
+1
-1
libavcodec/svq1dec.c
libavcodec/svq1dec.c
+1
-1
libavcodec/utils.c
libavcodec/utils.c
+1
-1
libavcodec/utvideoenc.c
libavcodec/utvideoenc.c
+1
-1
libavcodec/v210enc.c
libavcodec/v210enc.c
+1
-1
libavcodec/v410enc.c
libavcodec/v410enc.c
+1
-1
libavcodec/xbmenc.c
libavcodec/xbmenc.c
+1
-1
libavcodec/xwdenc.c
libavcodec/xwdenc.c
+1
-1
libavformat/output-example.c
libavformat/output-example.c
+2
-2
libavformat/utils.c
libavformat/utils.c
+1
-1
未找到文件。
avconv.c
浏览文件 @
5b9c3b45
...
...
@@ -637,7 +637,7 @@ static int poll_filter(OutputStream *ost)
AVFrame
*
filtered_frame
=
NULL
;
int
frame_size
,
ret
;
if
(
!
ost
->
filtered_frame
&&
!
(
ost
->
filtered_frame
=
av
codec_alloc_frame
()))
{
if
(
!
ost
->
filtered_frame
&&
!
(
ost
->
filtered_frame
=
av
_frame_alloc
()))
{
return
AVERROR
(
ENOMEM
);
}
else
avcodec_get_frame_defaults
(
ost
->
filtered_frame
);
...
...
@@ -1056,7 +1056,7 @@ static int decode_audio(InputStream *ist, AVPacket *pkt, int *got_output)
AVCodecContext
*
avctx
=
ist
->
st
->
codec
;
int
i
,
ret
,
err
=
0
,
resample_changed
;
if
(
!
ist
->
decoded_frame
&&
!
(
ist
->
decoded_frame
=
av
codec_alloc_frame
()))
if
(
!
ist
->
decoded_frame
&&
!
(
ist
->
decoded_frame
=
av
_frame_alloc
()))
return
AVERROR
(
ENOMEM
);
if
(
!
ist
->
filter_frame
&&
!
(
ist
->
filter_frame
=
av_frame_alloc
()))
return
AVERROR
(
ENOMEM
);
...
...
avplay.c
浏览文件 @
5b9c3b45
...
...
@@ -1842,7 +1842,7 @@ static int audio_decode_frame(VideoState *is, double *pts_ptr)
int
resample_changed
,
audio_resample
;
if
(
!
is
->
frame
)
{
if
(
!
(
is
->
frame
=
av
codec_alloc_frame
()))
if
(
!
(
is
->
frame
=
av
_frame_alloc
()))
return
AVERROR
(
ENOMEM
);
}
else
avcodec_get_frame_defaults
(
is
->
frame
);
...
...
libavcodec/alacenc.c
浏览文件 @
5b9c3b45
...
...
@@ -579,7 +579,7 @@ static av_cold int alac_encode_init(AVCodecContext *avctx)
goto
error
;
}
avctx
->
coded_frame
=
av
codec_alloc_frame
();
avctx
->
coded_frame
=
av
_frame_alloc
();
if
(
!
avctx
->
coded_frame
)
{
ret
=
AVERROR
(
ENOMEM
);
goto
error
;
...
...
libavcodec/api-example.c
浏览文件 @
5b9c3b45
...
...
@@ -155,7 +155,7 @@ static void audio_encode_example(const char *filename)
}
/* frame containing input raw audio */
frame
=
av
codec_alloc_frame
();
frame
=
av
_frame_alloc
();
if
(
!
frame
)
{
fprintf
(
stderr
,
"could not allocate audio frame
\n
"
);
exit
(
1
);
...
...
@@ -268,7 +268,7 @@ static void audio_decode_example(const char *outfilename, const char *filename)
int
got_frame
=
0
;
if
(
!
decoded_frame
)
{
if
(
!
(
decoded_frame
=
av
codec_alloc_frame
()))
{
if
(
!
(
decoded_frame
=
av
_frame_alloc
()))
{
fprintf
(
stderr
,
"out of memory
\n
"
);
exit
(
1
);
}
...
...
@@ -334,7 +334,7 @@ static void video_encode_example(const char *filename)
}
c
=
avcodec_alloc_context3
(
codec
);
picture
=
avcodec_alloc_frame
();
picture
=
av_frame_alloc
();
/* put sample parameters */
c
->
bit_rate
=
400000
;
...
...
@@ -479,7 +479,7 @@ static void video_decode_example(const char *outfilename, const char *filename)
}
c
=
avcodec_alloc_context3
(
codec
);
picture
=
avcodec_alloc_frame
();
picture
=
av_frame_alloc
();
if
(
codec
->
capabilities
&
CODEC_CAP_TRUNCATED
)
c
->
flags
|=
CODEC_FLAG_TRUNCATED
;
/* we do not send complete frames */
...
...
libavcodec/libopenjpegenc.c
浏览文件 @
5b9c3b45
...
...
@@ -168,7 +168,7 @@ static av_cold int libopenjpeg_encode_init(AVCodecContext *avctx)
return
AVERROR
(
ENOMEM
);
}
avctx
->
coded_frame
=
av
codec_alloc_frame
();
avctx
->
coded_frame
=
av
_frame_alloc
();
if
(
!
avctx
->
coded_frame
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error allocating coded frame
\n
"
);
goto
fail
;
...
...
libavcodec/libtheoraenc.c
浏览文件 @
5b9c3b45
...
...
@@ -259,7 +259,7 @@ static av_cold int encode_init(AVCodecContext* avc_context)
th_comment_clear
(
&
t_comment
);
/* Set up the output AVFrame */
avc_context
->
coded_frame
=
avcodec_alloc_frame
();
avc_context
->
coded_frame
=
av_frame_alloc
();
return
0
;
}
...
...
libavcodec/libvpxenc.c
浏览文件 @
5b9c3b45
...
...
@@ -353,7 +353,7 @@ static av_cold int vpx_init(AVCodecContext *avctx,
vpx_img_wrap
(
&
ctx
->
rawimg
,
VPX_IMG_FMT_I420
,
avctx
->
width
,
avctx
->
height
,
1
,
(
unsigned
char
*
)
1
);
avctx
->
coded_frame
=
av
codec_alloc_frame
();
avctx
->
coded_frame
=
av
_frame_alloc
();
if
(
!
avctx
->
coded_frame
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Error allocating coded frame
\n
"
);
vp8_free
(
avctx
);
...
...
libavcodec/pcm.c
浏览文件 @
5b9c3b45
...
...
@@ -48,7 +48,7 @@ static av_cold int pcm_encode_init(AVCodecContext *avctx)
avctx
->
bits_per_coded_sample
=
av_get_bits_per_sample
(
avctx
->
codec
->
id
);
avctx
->
block_align
=
avctx
->
channels
*
avctx
->
bits_per_coded_sample
/
8
;
avctx
->
bit_rate
=
avctx
->
block_align
*
avctx
->
sample_rate
*
8
;
avctx
->
coded_frame
=
av
codec_alloc_frame
();
avctx
->
coded_frame
=
av
_frame_alloc
();
if
(
!
avctx
->
coded_frame
)
return
AVERROR
(
ENOMEM
);
...
...
libavcodec/proresenc.c
浏览文件 @
5b9c3b45
...
...
@@ -1075,7 +1075,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
int
interlaced
=
!!
(
avctx
->
flags
&
CODEC_FLAG_INTERLACED_DCT
);
avctx
->
bits_per_raw_sample
=
10
;
avctx
->
coded_frame
=
av
codec_alloc_frame
();
avctx
->
coded_frame
=
av
_frame_alloc
();
if
(
!
avctx
->
coded_frame
)
return
AVERROR
(
ENOMEM
);
...
...
libavcodec/svq1dec.c
浏览文件 @
5b9c3b45
...
...
@@ -742,7 +742,7 @@ static av_cold int svq1_decode_init(AVCodecContext *avctx)
int
i
;
int
offset
=
0
;
s
->
prev
=
av
codec_alloc_frame
();
s
->
prev
=
av
_frame_alloc
();
if
(
!
s
->
prev
)
return
AVERROR
(
ENOMEM
);
...
...
libavcodec/utils.c
浏览文件 @
5b9c3b45
...
...
@@ -1125,7 +1125,7 @@ static int pad_last_frame(AVCodecContext *s, AVFrame **dst, const AVFrame *src)
AVFrame
*
frame
=
NULL
;
int
ret
;
if
(
!
(
frame
=
av
codec_alloc_frame
()))
if
(
!
(
frame
=
av
_frame_alloc
()))
return
AVERROR
(
ENOMEM
);
frame
->
format
=
src
->
format
;
...
...
libavcodec/utvideoenc.c
浏览文件 @
5b9c3b45
...
...
@@ -126,7 +126,7 @@ static av_cold int utvideo_encode_init(AVCodecContext *avctx)
return
AVERROR_OPTION_NOT_FOUND
;
}
avctx
->
coded_frame
=
av
codec_alloc_frame
();
avctx
->
coded_frame
=
av
_frame_alloc
();
if
(
!
avctx
->
coded_frame
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Could not allocate frame.
\n
"
);
...
...
libavcodec/v210enc.c
浏览文件 @
5b9c3b45
...
...
@@ -36,7 +36,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
av_log
(
avctx
,
AV_LOG_WARNING
,
"bits per raw sample: %d != 10-bit
\n
"
,
avctx
->
bits_per_raw_sample
);
avctx
->
coded_frame
=
av
codec_alloc_frame
();
avctx
->
coded_frame
=
av
_frame_alloc
();
if
(
!
avctx
->
coded_frame
)
return
AVERROR
(
ENOMEM
);
...
...
libavcodec/v410enc.c
浏览文件 @
5b9c3b45
...
...
@@ -32,7 +32,7 @@ static av_cold int v410_encode_init(AVCodecContext *avctx)
return
AVERROR_INVALIDDATA
;
}
avctx
->
coded_frame
=
av
codec_alloc_frame
();
avctx
->
coded_frame
=
av
_frame_alloc
();
if
(
!
avctx
->
coded_frame
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
"Could not allocate frame.
\n
"
);
...
...
libavcodec/xbmenc.c
浏览文件 @
5b9c3b45
...
...
@@ -26,7 +26,7 @@
static
av_cold
int
xbm_encode_init
(
AVCodecContext
*
avctx
)
{
avctx
->
coded_frame
=
av
codec_alloc_frame
();
avctx
->
coded_frame
=
av
_frame_alloc
();
if
(
!
avctx
->
coded_frame
)
return
AVERROR
(
ENOMEM
);
avctx
->
coded_frame
->
pict_type
=
AV_PICTURE_TYPE_I
;
...
...
libavcodec/xwdenc.c
浏览文件 @
5b9c3b45
...
...
@@ -32,7 +32,7 @@
static
av_cold
int
xwd_encode_init
(
AVCodecContext
*
avctx
)
{
avctx
->
coded_frame
=
av
codec_alloc_frame
();
avctx
->
coded_frame
=
av
_frame_alloc
();
if
(
!
avctx
->
coded_frame
)
return
AVERROR
(
ENOMEM
);
...
...
libavformat/output-example.c
浏览文件 @
5b9c3b45
...
...
@@ -138,7 +138,7 @@ static void write_audio_frame(AVFormatContext *oc, AVStream *st)
{
AVCodecContext
*
c
;
AVPacket
pkt
=
{
0
};
// data and size must be 0;
AVFrame
*
frame
=
av
codec_alloc_frame
();
AVFrame
*
frame
=
av
_frame_alloc
();
int
got_packet
;
av_init_packet
(
&
pkt
);
...
...
@@ -237,7 +237,7 @@ static AVFrame *alloc_picture(enum AVPixelFormat pix_fmt, int width, int height)
uint8_t
*
picture_buf
;
int
size
;
picture
=
av
codec_alloc_frame
();
picture
=
av
_frame_alloc
();
if
(
!
picture
)
return
NULL
;
size
=
avpicture_get_size
(
pix_fmt
,
width
,
height
);
...
...
libavformat/utils.c
浏览文件 @
5b9c3b45
...
...
@@ -1928,7 +1928,7 @@ static int try_decode_frame(AVStream *st, AVPacket *avpkt, AVDictionary **option
{
const
AVCodec
*
codec
;
int
got_picture
=
1
,
ret
=
0
;
AVFrame
*
frame
=
av
codec_alloc_frame
();
AVFrame
*
frame
=
av
_frame_alloc
();
AVPacket
pkt
=
*
avpkt
;
if
(
!
frame
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录