Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
626904b7
Commit
626904b7
authored
Feb 24, 2015
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avformat/dss: set bitrate
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
5634ca6d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
dss.c
libavformat/dss.c
+8
-0
No files found.
libavformat/dss.c
View file @
626904b7
...
@@ -54,6 +54,8 @@ typedef struct DSSDemuxContext {
...
@@ -54,6 +54,8 @@ typedef struct DSSDemuxContext {
int
swap
;
int
swap
;
int
dss_sp_swap_byte
;
int
dss_sp_swap_byte
;
int8_t
*
dss_sp_buf
;
int8_t
*
dss_sp_buf
;
int
packet_size
;
}
DSSDemuxContext
;
}
DSSDemuxContext
;
static
int
dss_probe
(
AVProbeData
*
p
)
static
int
dss_probe
(
AVProbeData
*
p
)
...
@@ -210,6 +212,7 @@ static void dss_sp_byte_swap(DSSDemuxContext *ctx,
...
@@ -210,6 +212,7 @@ static void dss_sp_byte_swap(DSSDemuxContext *ctx,
static
int
dss_sp_read_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
static
int
dss_sp_read_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
{
DSSDemuxContext
*
ctx
=
s
->
priv_data
;
DSSDemuxContext
*
ctx
=
s
->
priv_data
;
AVStream
*
st
=
s
->
streams
[
0
];
int
read_size
,
ret
,
offset
=
0
,
buff_offset
=
0
;
int
read_size
,
ret
,
offset
=
0
,
buff_offset
=
0
;
int64_t
pos
=
avio_tell
(
s
->
pb
);
int64_t
pos
=
avio_tell
(
s
->
pb
);
...
@@ -223,6 +226,7 @@ static int dss_sp_read_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -223,6 +226,7 @@ static int dss_sp_read_packet(AVFormatContext *s, AVPacket *pkt)
read_size
=
DSS_FRAME_SIZE
;
read_size
=
DSS_FRAME_SIZE
;
ctx
->
counter
-=
read_size
;
ctx
->
counter
-=
read_size
;
ctx
->
packet_size
=
DSS_FRAME_SIZE
-
1
;
ret
=
av_new_packet
(
pkt
,
DSS_FRAME_SIZE
);
ret
=
av_new_packet
(
pkt
,
DSS_FRAME_SIZE
);
if
(
ret
<
0
)
if
(
ret
<
0
)
...
@@ -231,6 +235,7 @@ static int dss_sp_read_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -231,6 +235,7 @@ static int dss_sp_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt
->
duration
=
264
;
pkt
->
duration
=
264
;
pkt
->
pos
=
pos
;
pkt
->
pos
=
pos
;
pkt
->
stream_index
=
0
;
pkt
->
stream_index
=
0
;
s
->
bit_rate
=
8LL
*
ctx
->
packet_size
*
st
->
codec
->
sample_rate
*
512
/
(
506
*
pkt
->
duration
);
if
(
ctx
->
counter
<
0
)
{
if
(
ctx
->
counter
<
0
)
{
int
size2
=
ctx
->
counter
+
read_size
;
int
size2
=
ctx
->
counter
+
read_size
;
...
@@ -264,6 +269,7 @@ error_eof:
...
@@ -264,6 +269,7 @@ error_eof:
static
int
dss_723_1_read_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
static
int
dss_723_1_read_packet
(
AVFormatContext
*
s
,
AVPacket
*
pkt
)
{
{
DSSDemuxContext
*
ctx
=
s
->
priv_data
;
DSSDemuxContext
*
ctx
=
s
->
priv_data
;
AVStream
*
st
=
s
->
streams
[
0
];
int
size
,
byte
,
ret
,
offset
;
int
size
,
byte
,
ret
,
offset
;
int64_t
pos
=
avio_tell
(
s
->
pb
);
int64_t
pos
=
avio_tell
(
s
->
pb
);
...
@@ -277,6 +283,7 @@ static int dss_723_1_read_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -277,6 +283,7 @@ static int dss_723_1_read_packet(AVFormatContext *s, AVPacket *pkt)
size
=
frame_size
[
byte
&
3
];
size
=
frame_size
[
byte
&
3
];
ctx
->
packet_size
=
size
;
ctx
->
counter
-=
size
;
ctx
->
counter
-=
size
;
ret
=
av_new_packet
(
pkt
,
size
);
ret
=
av_new_packet
(
pkt
,
size
);
...
@@ -287,6 +294,7 @@ static int dss_723_1_read_packet(AVFormatContext *s, AVPacket *pkt)
...
@@ -287,6 +294,7 @@ static int dss_723_1_read_packet(AVFormatContext *s, AVPacket *pkt)
pkt
->
data
[
0
]
=
byte
;
pkt
->
data
[
0
]
=
byte
;
offset
=
1
;
offset
=
1
;
pkt
->
duration
=
240
;
pkt
->
duration
=
240
;
s
->
bit_rate
=
8LL
*
size
*
st
->
codec
->
sample_rate
*
512
/
(
506
*
pkt
->
duration
);
pkt
->
stream_index
=
0
;
pkt
->
stream_index
=
0
;
...
...
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