Lines Matching defs:state
34 * helper structure describing keyframe search state of one stream
401 AVParserState *state = av_malloc(sizeof(AVParserState));
402 if (!state)
405 state->stream_states = av_malloc(sizeof(AVParserStreamState) * s->nb_streams);
406 if (!state->stream_states) {
407 av_free(state);
411 state->fpos = avio_tell(s->pb);
414 state->packet_buffer = s->packet_buffer;
415 state->parse_queue = s->parse_queue;
416 state->raw_packet_buffer = s->raw_packet_buffer;
417 state->raw_packet_buffer_remaining_size = s->raw_packet_buffer_remaining_size;
425 state->nb_streams = s->nb_streams;
428 ss = &state->stream_states[i];
441 return state;
444 void ff_restore_parser_state(AVFormatContext *s, AVParserState *state)
451 if (!state)
454 avio_seek(s->pb, state->fpos, SEEK_SET);
457 s->packet_buffer = state->packet_buffer;
458 s->parse_queue = state->parse_queue;
459 s->raw_packet_buffer = state->raw_packet_buffer;
460 s->raw_packet_buffer_remaining_size = state->raw_packet_buffer_remaining_size;
463 for (i = 0; i < state->nb_streams; i++) {
465 ss = &state->stream_states[i];
473 av_free(state->stream_states);
474 av_free(state);
488 void ff_free_parser_state(AVFormatContext *s, AVParserState *state)
493 if (!state)
496 for (i = 0; i < state->nb_streams; i++) {
497 ss = &state->stream_states[i];
502 free_packet_list(state->packet_buffer);
503 free_packet_list(state->parse_queue);
504 free_packet_list(state->raw_packet_buffer);
506 av_free(state->stream_states);
507 av_free(state);