Revision 7c640de1

View differences:

src/Chunkiser/input-stream-ipb.c
13 13
#include "payload.h"
14 14
#include "config.h"
15 15
#include "chunkiser_iface.h"
16
#include "chunkiser_attrib.h"
16 17

  
17 18
#define STATIC_BUFF_SIZE 1000 * 1024
18 19

  
......
433 434
  s->last_ts = *ts;
434 435
  av_free_packet(&pkt);
435 436

  
437
  //if (*attr_size) {					//TODO: is this check needed
438
  //    fprintf(stderr, "Chunk with attribute?\n");
439
  //} else 
440
  if (result) {
441
    struct chunk_attributes_chunker *ca;
442

  
443
    ca = *attr = malloc(sizeof(*ca));
444
    if (ca) {
445
      chunk_attributes_chunker_init(ca);
446
      *attr_size = sizeof(*ca);
447
      switch(frame_type(&pkt)) {
448
        case FF_I_TYPE:
449
          ca->priority = 1;
450
          break;
451
        case FF_P_TYPE:
452
          ca->priority = 2;
453
          break;
454
        case FF_B_TYPE:
455
          ca->priority = 3;
456
          break;
457
      }
458
    } else {
459
      *attr_size = 0;
460
    }
461
  } else {
462
    *attr_size = 0;
463
  }
464

  
436 465
  return result;
437 466
}
438 467

  

Also available in: Unified diff