Revision 491ea146 Cutter/input-avs.c

View differences:

Cutter/input-avs.c
181 181

  
182 182
    return 0;
183 183
}
184

  
185
int chunk_read_avs2(void *s_h, struct chunk *c)
186
{
187
    AVFormatContext *s = s_h;
188
    static AVPacket pkt;
189
    int res;
190
    static uint8_t static_buff[STATIC_BUFF_SIZE];
191

  
192
    res = av_read_frame(s, &pkt);
193
    if (res >= 0) {
194
      memcpy(static_buff, pkt.data, pkt.size);
195
      c->frame[0] = static_buff;
196
      c->frame_len[0] = pkt.size;
197
      c->stride_size = 1;
198
      return 1;
199
    }
200

  
201
    return 0;
202
}
203

  
204

  

Also available in: Unified diff