History

matroskadec: fix type of the length field in ebml_read_master() Also use the correct value for unknown size (instead of a truncated and sign extended value).

Originally committed as revision 23591 to svn://svn.ffmpeg.org/ffmpeg/trunk

Aurelien Jacobs committed 16 years ago

Commit bddd1d91 parent 73917811 file · +2 −2Browse files

Unified · Split

libavformat/matroskadec.c+2−2
@@ -657,7 +657,7 @@ static int ebml_read_binary(ByteIOContext *pb, int length, EbmlBin *bin) · 656 unmodified lines
657 * are supposed to be sub-elements which can be read separately.657 * are supposed to be sub-elements which can be read separately.
658 * 0 is success, < 0 is failure.658 * 0 is success, < 0 is failure.
659 */659 */
660static int ebml_read_master(MatroskaDemuxContext *matroska, int length)660static int ebml_read_master(MatroskaDemuxContext *matroska, uint64_t length)
661{661{
662 ByteIOContext *pb = matroska->ctx->pb;662 ByteIOContext *pb = matroska->ctx->pb;
663 MatroskaLevel *level;663 MatroskaLevel *level;
@@ -718,7 +718,7 @@ static int ebml_parse_id(MatroskaDemuxContext *matroska, EbmlSyntax *syntax, · 54 unmodified lines
718 break;718 break;
719 if (!syntax[i].id && id == MATROSKA_ID_CLUSTER &&719 if (!syntax[i].id && id == MATROSKA_ID_CLUSTER &&
720 matroska->num_levels > 0 &&720 matroska->num_levels > 0 &&
721 matroska->levels[matroska->num_levels-1].length == 0xffffffffffffffff)721 matroska->levels[matroska->num_levels-1].length == 0xffffffffffffff)
722 return 0; // we reached the end of an unknown size cluster722 return 0; // we reached the end of an unknown size cluster
723 if (!syntax[i].id && id != EBML_ID_VOID && id != EBML_ID_CRC32)723 if (!syntax[i].id && id != EBML_ID_VOID && id != EBML_ID_CRC32)
724 av_log(matroska->ctx, AV_LOG_INFO, "Unknown entry 0x%X\n", id);724 av_log(matroska->ctx, AV_LOG_INFO, "Unknown entry 0x%X\n", id);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t