Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
ca7c3287
Commit
ca7c3287
authored
Mar 06, 2004
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* transcode.c: fixed SVQ3 transcoding.
parent
d5eebbe1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
4 deletions
+50
-4
modules/stream_out/transcode.c
modules/stream_out/transcode.c
+50
-4
No files found.
modules/stream_out/transcode.c
View file @
ca7c3287
...
...
@@ -2,7 +2,7 @@
* transcode.c: transcoding stream output module
*****************************************************************************
* Copyright (C) 2003-2004 VideoLAN
* $Id
: transcode.c,v 1.82 2004/03/03 20:39:52 gbazin Exp
$
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
* Gildas Bazin <gbazin@netcourrier.com>
...
...
@@ -1076,9 +1076,54 @@ static int transcode_video_ffmpeg_new( sout_stream_t *p_stream,
id
->
ff_dec_c
=
avcodec_alloc_context
();
id
->
ff_dec_c
->
width
=
id
->
f_src
.
video
.
i_width
;
id
->
ff_dec_c
->
height
=
id
->
f_src
.
video
.
i_height
;
id
->
ff_dec_c
->
bits_per_sample
=
id
->
f_src
.
video
.
i_bits_per_pixel
;
/* id->ff_dec_c->bit_rate = id->f_src.i_bitrate; */
id
->
ff_dec_c
->
extradata_size
=
id
->
f_src
.
i_extra
;
id
->
ff_dec_c
->
extradata
=
id
->
f_src
.
p_extra
;
if
(
id
->
f_src
.
i_extra
>
0
)
{
if
(
i_ff_codec
==
CODEC_ID_SVQ3
)
{
int
i_size
=
id
->
f_src
.
i_extra
;
uint8_t
*
p
;
id
->
ff_dec_c
->
extradata_size
=
i_size
+
12
;
p
=
id
->
ff_dec_c
->
extradata
=
malloc
(
i_size
+
12
);
memcpy
(
&
p
[
0
],
"SVQ3"
,
4
);
memset
(
&
p
[
4
],
0
,
8
);
memcpy
(
&
p
[
12
],
id
->
f_src
.
p_extra
,
i_size
);
/* Now remove all atoms before the SMI one */
if
(
id
->
ff_dec_c
->
extradata_size
>
0x5a
&&
strncmp
(
&
p
[
0x56
],
"SMI "
,
4
)
)
{
uint8_t
*
psz
=
&
p
[
0x52
];
while
(
psz
<
&
p
[
id
->
ff_dec_c
->
extradata_size
-
8
]
)
{
int
i_size
=
GetDWBE
(
psz
);
if
(
i_size
<=
1
)
{
/* FIXME handle 1 as long size */
break
;
}
if
(
!
strncmp
(
&
psz
[
4
],
"SMI "
,
4
)
)
{
memmove
(
&
p
[
0x52
],
psz
,
&
p
[
id
->
ff_dec_c
->
extradata_size
]
-
psz
);
break
;
}
psz
+=
i_size
;
}
}
}
else
{
id
->
ff_dec_c
->
extradata_size
=
id
->
f_src
.
i_extra
;
id
->
ff_dec_c
->
extradata
=
malloc
(
id
->
f_src
.
i_extra
+
FF_INPUT_BUFFER_PADDING_SIZE
);
memcpy
(
id
->
ff_dec_c
->
extradata
,
id
->
f_src
.
p_extra
,
id
->
f_src
.
i_extra
);
memset
(
(
uint8_t
*
)
id
->
ff_dec_c
->
extradata
+
id
->
f_src
.
i_extra
,
0
,
FF_INPUT_BUFFER_PADDING_SIZE
);
}
}
id
->
ff_dec_c
->
workaround_bugs
=
FF_BUG_AUTODETECT
;
id
->
ff_dec_c
->
error_resilience
=
-
1
;
id
->
ff_dec_c
->
get_buffer
=
transcode_video_ffmpeg_getframebuf
;
...
...
@@ -1089,7 +1134,7 @@ static int transcode_video_ffmpeg_new( sout_stream_t *p_stream,
msg_Err
(
p_stream
,
"cannot open decoder"
);
return
VLC_EGENERIC
;
}
#if 0
if( i_ff_codec == CODEC_ID_MPEG4 && id->ff_dec_c->extradata_size > 0 )
{
int b_gotpicture;
...
...
@@ -1107,6 +1152,7 @@ static int transcode_video_ffmpeg_new( sout_stream_t *p_stream,
id->ff_dec_c->extradata_size );
free( p_vol );
}
#endif
}
/* Open encoder */
...
...
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