Revision e356fc57 libavformat/nuv.c

View differences:

libavformat/nuv.c
66 66
        switch (frametype) {
67 67
            case NUV_EXTRADATA:
68 68
                subtype = avio_r8(pb);
69
                url_fskip(pb, 6);
69
                avio_seek(pb, 6, SEEK_CUR);
70 70
                size = PKTSIZE(avio_rl32(pb));
71 71
                if (vst && subtype == 'R') {
72 72
                    vst->codec->extradata_size = size;
......
78 78
                }
79 79
                break;
80 80
            case NUV_MYTHEXT:
81
                url_fskip(pb, 7);
81
                avio_seek(pb, 7, SEEK_CUR);
82 82
                size = PKTSIZE(avio_rl32(pb));
83 83
                if (size != 128 * 4)
84 84
                    break;
......
90 90
                    if (vst->codec->codec_tag == MKTAG('R', 'J', 'P', 'G'))
91 91
                        vst->codec->codec_id = CODEC_ID_NUV;
92 92
                } else
93
                    url_fskip(pb, 4);
93
                    avio_seek(pb, 4, SEEK_CUR);
94 94

  
95 95
                if (ast) {
96 96
                    ast->codec->codec_tag = avio_rl32(pb);
......
102 102
                                         ast->codec->bits_per_coded_sample);
103 103
                    ast->need_parsing = AVSTREAM_PARSE_FULL;
104 104
                } else
105
                    url_fskip(pb, 4 * 4);
105
                    avio_seek(pb, 4 * 4, SEEK_CUR);
106 106

  
107 107
                size -= 6 * 4;
108
                url_fskip(pb, size);
108
                avio_seek(pb, size, SEEK_CUR);
109 109
                return 1;
110 110
            case NUV_SEEKP:
111 111
                size = 11;
112 112
                break;
113 113
            default:
114
                url_fskip(pb, 7);
114
                avio_seek(pb, 7, SEEK_CUR);
115 115
                size = PKTSIZE(avio_rl32(pb));
116 116
                break;
117 117
        }
118
        url_fskip(pb, size);
118
        avio_seek(pb, size, SEEK_CUR);
119 119
    }
120 120
    return 0;
121 121
}
......
130 130
    AVStream *vst = NULL, *ast = NULL;
131 131
    avio_read(pb, id_string, 12);
132 132
    is_mythtv = !memcmp(id_string, "MythTVVideo", 12);
133
    url_fskip(pb, 5); // version string
134
    url_fskip(pb, 3); // padding
133
    avio_seek(pb, 5, SEEK_CUR); // version string
134
    avio_seek(pb, 3, SEEK_CUR); // padding
135 135
    width = avio_rl32(pb);
136 136
    height = avio_rl32(pb);
137 137
    avio_rl32(pb); // unused, "desiredwidth"
138 138
    avio_rl32(pb); // unused, "desiredheight"
139 139
    avio_r8(pb); // 'P' == progressive, 'I' == interlaced
140
    url_fskip(pb, 3); // padding
140
    avio_seek(pb, 3, SEEK_CUR); // padding
141 141
    aspect = av_int2dbl(avio_rl64(pb));
142 142
    if (aspect > 0.9999 && aspect < 1.0001)
143 143
        aspect = 4.0 / 3.0;
......
206 206
        switch (frametype) {
207 207
            case NUV_EXTRADATA:
208 208
                if (!ctx->rtjpg_video) {
209
                    url_fskip(pb, size);
209
                    avio_seek(pb, size, SEEK_CUR);
210 210
                    break;
211 211
                }
212 212
            case NUV_VIDEO:
213 213
                if (ctx->v_id < 0) {
214 214
                    av_log(s, AV_LOG_ERROR, "Video packet in file without video stream!\n");
215
                    url_fskip(pb, size);
215
                    avio_seek(pb, size, SEEK_CUR);
216 216
                    break;
217 217
                }
218 218
                ret = av_new_packet(pkt, copyhdrsize + size);
......
236 236
            case NUV_AUDIO:
237 237
                if (ctx->a_id < 0) {
238 238
                    av_log(s, AV_LOG_ERROR, "Audio packet in file without audio stream!\n");
239
                    url_fskip(pb, size);
239
                    avio_seek(pb, size, SEEK_CUR);
240 240
                    break;
241 241
                }
242 242
                ret = av_get_packet(pb, pkt, size);
......
250 250
                // contains no data, size value is invalid
251 251
                break;
252 252
            default:
253
                url_fskip(pb, size);
253
                avio_seek(pb, size, SEEK_CUR);
254 254
                break;
255 255
        }
256 256
    }

Also available in: Unified diff