mirror of https://git.ffmpeg.org/ffmpeg.git
simplify bitstream reading
Originally committed as revision 10745 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
2143b11853
commit
269b94e346
|
@ -83,22 +83,10 @@ static int process_ea_header(AVFormatContext *s) {
|
||||||
EaDemuxContext *ea = s->priv_data;
|
EaDemuxContext *ea = s->priv_data;
|
||||||
ByteIOContext *pb = &s->pb;
|
ByteIOContext *pb = &s->pb;
|
||||||
|
|
||||||
if (get_buffer(pb, (void*)&blockid, 4) != 4) {
|
if (get_le32(pb) != SCHl_TAG)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
size = get_le32(pb);
|
||||||
if (le2me_32(blockid) != SCHl_TAG) {
|
if (get_le32(pb) != PT00_TAG) {
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (get_buffer(pb, (void*)&size, 4) != 4) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
size = le2me_32(size);
|
|
||||||
|
|
||||||
if (get_buffer(pb, (void*)&blockid, 4) != 4) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
if (le2me_32(blockid) != PT00_TAG) {
|
|
||||||
av_log (s, AV_LOG_ERROR, "PT header missing\n");
|
av_log (s, AV_LOG_ERROR, "PT header missing\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue