Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
024c7378
Commit
024c7378
authored
18 years ago
by
Baptiste Coudurier
Browse files
Options
Downloads
Patches
Plain Diff
factorize
Originally committed as revision 8175 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
dfc1313d
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavformat/swf.c
+7
-10
7 additions, 10 deletions
libavformat/swf.c
with
7 additions
and
10 deletions
libavformat/swf.c
+
7
−
10
View file @
024c7378
...
@@ -786,13 +786,8 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
...
@@ -786,13 +786,8 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
get_byte
(
pb
);
get_byte
(
pb
);
/* Check for FLV1 */
/* Check for FLV1 */
vst
=
av_new_stream
(
s
,
ch_id
);
vst
=
av_new_stream
(
s
,
ch_id
);
av_set_pts_info
(
vst
,
24
,
1
,
1000
);
/* 24 bit pts in ms */
vst
->
codec
->
codec_type
=
CODEC_TYPE_VIDEO
;
vst
->
codec
->
codec_type
=
CODEC_TYPE_VIDEO
;
vst
->
codec
->
codec_id
=
codec_get_id
(
swf_codec_tags
,
get_byte
(
pb
));
vst
->
codec
->
codec_id
=
codec_get_id
(
swf_codec_tags
,
get_byte
(
pb
));
if
(
swf
->
ms_per_frame
)
{
vst
->
codec
->
time_base
.
den
=
1000
.
/
swf
->
ms_per_frame
;
vst
->
codec
->
time_base
.
num
=
1
;
}
}
else
if
(
(
tag
==
TAG_STREAMHEAD
||
tag
==
TAG_STREAMHEAD2
)
&&
!
ast
)
{
}
else
if
(
(
tag
==
TAG_STREAMHEAD
||
tag
==
TAG_STREAMHEAD2
)
&&
!
ast
)
{
/* streaming found */
/* streaming found */
int
sample_rate_code
;
int
sample_rate_code
;
...
@@ -816,18 +811,20 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
...
@@ -816,18 +811,20 @@ static int swf_read_header(AVFormatContext *s, AVFormatParameters *ap)
}
else
if
(
tag
==
TAG_JPEG2
&&
!
vst
)
{
}
else
if
(
tag
==
TAG_JPEG2
&&
!
vst
)
{
vst
=
av_new_stream
(
s
,
-
2
);
/* -2 to avoid clash with video stream and audio stream */
vst
=
av_new_stream
(
s
,
-
2
);
/* -2 to avoid clash with video stream and audio stream */
av_set_pts_info
(
vst
,
24
,
1
,
1000
);
/* 24 bit pts in ms */
vst
->
codec
->
codec_type
=
CODEC_TYPE_VIDEO
;
vst
->
codec
->
codec_type
=
CODEC_TYPE_VIDEO
;
vst
->
codec
->
codec_id
=
CODEC_ID_MJPEG
;
vst
->
codec
->
codec_id
=
CODEC_ID_MJPEG
;
if
(
swf
->
ms_per_frame
)
{
vst
->
codec
->
time_base
.
den
=
1000
.
/
swf
->
ms_per_frame
;
vst
->
codec
->
time_base
.
num
=
1
;
}
url_fskip
(
pb
,
len
);
url_fskip
(
pb
,
len
);
}
else
{
}
else
{
url_fskip
(
pb
,
len
);
url_fskip
(
pb
,
len
);
}
}
}
}
if
(
vst
)
{
av_set_pts_info
(
vst
,
24
,
1
,
1000
);
/* 24 bit pts in ms */
if
(
swf
->
ms_per_frame
)
{
vst
->
codec
->
time_base
.
den
=
1000
.
/
swf
->
ms_per_frame
;
vst
->
codec
->
time_base
.
num
=
1
;
}
}
url_fseek
(
pb
,
firstTagOff
,
SEEK_SET
);
url_fseek
(
pb
,
firstTagOff
,
SEEK_SET
);
return
0
;
return
0
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment