Hi,
I am trying to grab a live stream from an AXIS IP Camera and resend it to
another ip address. At the time of reading the frame into a packet, the
packet's dts and pts are both AV_NOPTS_VALUE. Anybody would know why this is
happening and how to solve it?
AVPacket *read_input_packet(AVFormatContext *s)
{
static AVPacket pckt;
AVStream *st;
int res;
res = av_read_frame(s, &pckt);
if (res < 0)
{
PTRACE(1, "read frame unsuccessful with error: " << res);
return NULL;
}
st = s->streams[pckt.stream_index];
if (pckt.dts == AV_NOPTS_VALUE)
{
PTRACE(1, "Unknown DTS");
if(pckt.pts == AV_NOPTS_VALUE)
{
PTRACE(1, "Unknown PTS too!");
return NULL;
}
}
time_base_convert(&pckt, st);
return &pckt;
}
_______________________________________________
libav-user mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/libav-user