Revision bec77fd1 Chunkiser/input-stream-avs.c

View differences:

Chunkiser/input-stream-avs.c
7 7
#include <libavformat/avformat.h>
8 8
#include <stdbool.h>
9 9

  
10
#include "../dbg.h"
10 11
#include "../input-stream.h"
11 12
#include "../input.h"		//TODO: for flags. Check if we can do something smarter
12 13
#define STATIC_BUFF_SIZE 1000 * 1024
......
101 102
  }
102 103
  pts = av_rescale_q(pkt->pts, st->time_base, (AVRational){fps.den, fps.num}),
103 104
  pts += av_rescale_q(base_ts, AV_TIME_BASE_Q, (AVRational){fps.den, fps.num});
105
  dprintf("pkt->pts=%ld PTS=%d",pkt->pts, pts);
104 106
  dts = av_rescale_q(pkt->dts, st->time_base, (AVRational){fps.den, fps.num});
105 107
  dts += av_rescale_q(base_ts, AV_TIME_BASE_Q, (AVRational){fps.den, fps.num});
108
  dprintf(" DTS=%d\n",dts);
106 109
  data[2] = pts >> 8;
107 110
  data[3] = pts & 0xFF;
108 111
  data[4] = dts >> 8;
......
306 309
      memcpy(data + header_size + 2 + 2 + 2, pkt.data, pkt.size);
307 310
    }
308 311
    *ts = av_rescale_q(pkt.dts, s->s->streams[pkt.stream_index]->time_base, AV_TIME_BASE_Q);
312
    dprintf("pkt.dts=%ld TS1=%lu" , pkt.dts, *ts);
309 313
    *ts += s->base_ts;
314
    dprintf(" TS2=%lu\n",*ts);
310 315
    s->last_ts = *ts;
311 316
    av_free_packet(&pkt);
312 317

  

Also available in: Unified diff