mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-11 06:58:18 +00:00
packet: initialize time_base field to (0, 1) instead of (0, 0)
Forget rational or irrational numbers, division by zero is undefined.
This commit is contained in:
parent
a1a0fddfd0
commit
c8b1f2bcc4
@ -47,7 +47,7 @@ void av_init_packet(AVPacket *pkt)
|
|||||||
pkt->side_data_elems = 0;
|
pkt->side_data_elems = 0;
|
||||||
pkt->opaque = NULL;
|
pkt->opaque = NULL;
|
||||||
pkt->opaque_ref = NULL;
|
pkt->opaque_ref = NULL;
|
||||||
pkt->time_base = av_make_q(0, 0);
|
pkt->time_base = av_make_q(0, 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -58,6 +58,7 @@ static void get_packet_defaults(AVPacket *pkt)
|
|||||||
pkt->pts = AV_NOPTS_VALUE;
|
pkt->pts = AV_NOPTS_VALUE;
|
||||||
pkt->dts = AV_NOPTS_VALUE;
|
pkt->dts = AV_NOPTS_VALUE;
|
||||||
pkt->pos = -1;
|
pkt->pos = -1;
|
||||||
|
pkt->time_base = av_make_q(0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
AVPacket *av_packet_alloc(void)
|
AVPacket *av_packet_alloc(void)
|
||||||
|
Loading…
Reference in New Issue
Block a user