This website works better with JavaScript.
Home
Help
Sign In
falkTX
/
FFmpeg
mirror of
https://github.com/falkTX/FFmpeg.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
338
Wiki
Activity
Browse Source
Honor the 8bit extension (now 32bit instaed 24bit) of the pts field introduced in FLV specification v9.
Originally committed as revision 11043 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Alex Beregszaszi
17 years ago
parent
964ff35445
commit
018b6fb465
2 changed files
with
4 additions
and
2 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+2
-1
libavformat/flvdec.c
+2
-1
libavformat/flvenc.c
+ 2
- 1
libavformat/flvdec.c
View File
@@ -275,10 +275,11 @@ static int flv_read_packet(AVFormatContext *s, AVPacket *pkt)
type = get_byte(&s->pb);
type = get_byte(&s->pb);
size = get_be24(&s->pb);
size = get_be24(&s->pb);
pts = get_be24(&s->pb);
pts = get_be24(&s->pb);
pts |= get_byte(&s->pb) << 24;
// av_log(s, AV_LOG_DEBUG, "type:%d, size:%d, pts:%d\n", type, size, pts);
// av_log(s, AV_LOG_DEBUG, "type:%d, size:%d, pts:%d\n", type, size, pts);
if (url_feof(&s->pb))
if (url_feof(&s->pb))
return AVERROR(EIO);
return AVERROR(EIO);
url_fskip(&s->pb,
4); /* reserved
*/
url_fskip(&s->pb,
3); /* stream id, always 0
*/
flags = 0;
flags = 0;
if(size == 0)
if(size == 0)
+ 2
- 1
libavformat/flvenc.c
View File
@@ -307,7 +307,8 @@ static int flv_write_packet(AVFormatContext *s, AVPacket *pkt)
put_be24(pb,size + flags_size);
put_be24(pb,size + flags_size);
put_be24(pb,pkt->pts);
put_be24(pb,pkt->pts);
put_be32(pb,flv->reserved);
put_byte(pb,pkt->pts >> 24);
put_be24(pb,flv->reserved);
put_byte(pb,flags);
put_byte(pb,flags);
if (enc->codec_id == CODEC_ID_VP6)
if (enc->codec_id == CODEC_ID_VP6)
put_byte(pb,0);
put_byte(pb,0);
Write
Preview
Loading…
Cancel
Save