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
0b9dffc6
Commit
0b9dffc6
authored
Mar 09, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve codec_tag guessing code.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
24009f36
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
utils.c
libavformat/utils.c
+6
-2
No files found.
libavformat/utils.c
View file @
0b9dffc6
...
...
@@ -25,6 +25,7 @@
#include "avio_internal.h"
#include "internal.h"
#include "libavcodec/internal.h"
#include "libavcodec/raw.h"
#include "libavutil/opt.h"
#include "metadata.h"
#include "id3v2.h"
...
...
@@ -2428,8 +2429,11 @@ int av_find_stream_info(AVFormatContext *ic)
(
st
->
codec_info_nb_frames
-
2
)
*
(
int64_t
)
st
->
time_base
.
den
,
st
->
info
->
codec_info_duration
*
(
int64_t
)
st
->
time_base
.
num
,
60000
);
if
(
st
->
codec
->
codec_type
==
AVMEDIA_TYPE_VIDEO
)
{
if
(
st
->
codec
->
codec_id
==
CODEC_ID_RAWVIDEO
&&
!
st
->
codec
->
codec_tag
&&
!
st
->
codec
->
bits_per_coded_sample
)
st
->
codec
->
codec_tag
=
avcodec_pix_fmt_to_codec_tag
(
st
->
codec
->
pix_fmt
);
if
(
st
->
codec
->
codec_id
==
CODEC_ID_RAWVIDEO
&&
!
st
->
codec
->
codec_tag
&&
!
st
->
codec
->
bits_per_coded_sample
){
uint32_t
tag
=
avcodec_pix_fmt_to_codec_tag
(
st
->
codec
->
pix_fmt
);
if
(
ff_find_pix_fmt
(
ff_raw_pix_fmt_tags
,
tag
)
==
st
->
codec
->
pix_fmt
)
st
->
codec
->
codec_tag
=
tag
;
}
// the check for tb_unreliable() is not completely correct, since this is not about handling
// a unreliable/inexact time base, but a time base that is finer than necessary, as e.g.
...
...
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