Revision b7effd4e libavformat/ingenientdec.c

View differences:

libavformat/ingenientdec.c
27 27
{
28 28
    int ret, size, w, h, unk1, unk2;
29 29

  
30
    if (get_le32(s->pb) != MKTAG('M', 'J', 'P', 'G'))
30
    if (avio_rl32(s->pb) != MKTAG('M', 'J', 'P', 'G'))
31 31
        return AVERROR(EIO); // FIXME
32 32

  
33
    size = get_le32(s->pb);
33
    size = avio_rl32(s->pb);
34 34

  
35
    w = get_le16(s->pb);
36
    h = get_le16(s->pb);
35
    w = avio_rl16(s->pb);
36
    h = avio_rl16(s->pb);
37 37

  
38 38
    url_fskip(s->pb, 8); // zero + size (padded?)
39 39
    url_fskip(s->pb, 2);
40
    unk1 = get_le16(s->pb);
41
    unk2 = get_le16(s->pb);
40
    unk1 = avio_rl16(s->pb);
41
    unk2 = avio_rl16(s->pb);
42 42
    url_fskip(s->pb, 22); // ASCII timestamp
43 43

  
44 44
    av_log(s, AV_LOG_DEBUG, "Ingenient packet: size=%d, width=%d, height=%d, unk1=%d unk2=%d\n",
......
49 49

  
50 50
    pkt->pos = url_ftell(s->pb);
51 51
    pkt->stream_index = 0;
52
    ret = get_buffer(s->pb, pkt->data, size);
52
    ret = avio_read(s->pb, pkt->data, size);
53 53
    if (ret < 0) {
54 54
        av_free_packet(pkt);
55 55
        return ret;

Also available in: Unified diff