Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Ffmpeg
提交
9d2a0695
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,发现更多精彩内容 >>
提交
9d2a0695
编写于
11月 30, 2004
作者:
M
Michael Niedermayer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
raw rgb flip fix
Originally committed as revision 3724 to
svn://svn.ffmpeg.org/ffmpeg/trunk
上级
1b307feb
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
10 deletion
+9
-10
ffplay.c
ffplay.c
+0
-10
libavcodec/raw.c
libavcodec/raw.c
+9
-0
未找到文件。
ffplay.c
浏览文件 @
9d2a0695
...
...
@@ -899,15 +899,6 @@ static int video_thread(void *arg)
if
(
pkt
->
dts
!=
AV_NOPTS_VALUE
)
pts
=
(
double
)
pkt
->
dts
/
AV_TIME_BASE
;
if
(
is
->
video_st
->
codec
.
codec_id
==
CODEC_ID_RAWVIDEO
)
{
avpicture_fill
((
AVPicture
*
)
frame
,
pkt
->
data
,
is
->
video_st
->
codec
.
pix_fmt
,
is
->
video_st
->
codec
.
width
,
is
->
video_st
->
codec
.
height
);
frame
->
pict_type
=
FF_I_TYPE
;
if
(
output_picture2
(
is
,
frame
,
pts
)
<
0
)
goto
the_end
;
}
else
{
len1
=
avcodec_decode_video
(
&
is
->
video_st
->
codec
,
frame
,
&
got_picture
,
pkt
->
data
,
pkt
->
size
);
...
...
@@ -917,7 +908,6 @@ static int video_thread(void *arg)
if
(
output_picture2
(
is
,
frame
,
pts
)
<
0
)
goto
the_end
;
}
}
av_free_packet
(
pkt
);
if
(
step
)
if
(
cur_stream
)
...
...
libavcodec/raw.c
浏览文件 @
9d2a0695
...
...
@@ -106,6 +106,13 @@ static int raw_init_decoder(AVCodecContext *avctx)
return
0
;
}
static
void
flip
(
AVCodecContext
*
avctx
,
AVPicture
*
picture
){
if
(
!
avctx
->
codec_tag
&&
avctx
->
bits_per_sample
&&
picture
->
linesize
[
1
]
==
0
){
picture
->
data
[
0
]
+=
picture
->
linesize
[
0
]
*
(
avctx
->
height
-
1
);
picture
->
linesize
[
0
]
*=
-
1
;
}
}
static
int
raw_decode
(
AVCodecContext
*
avctx
,
void
*
data
,
int
*
data_size
,
uint8_t
*
buf
,
int
buf_size
)
...
...
@@ -118,6 +125,7 @@ static int raw_decode(AVCodecContext *avctx,
/* Early out without copy if packet size == frame size */
if
(
buf_size
==
context
->
length
&&
context
->
p
==
context
->
buffer
)
{
avpicture_fill
(
picture
,
buf
,
avctx
->
pix_fmt
,
avctx
->
width
,
avctx
->
height
);
flip
(
avctx
,
picture
);
*
data_size
=
sizeof
(
AVPicture
);
return
buf_size
;
}
...
...
@@ -132,6 +140,7 @@ static int raw_decode(AVCodecContext *avctx,
memcpy
(
context
->
p
,
buf
,
bytesNeeded
);
context
->
p
=
context
->
buffer
;
avpicture_fill
(
picture
,
context
->
buffer
,
avctx
->
pix_fmt
,
avctx
->
width
,
avctx
->
height
);
flip
(
avctx
,
picture
);
*
data_size
=
sizeof
(
AVPicture
);
return
bytesNeeded
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录