summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-10 16:50:06 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-10 16:50:06 +0200
commit91bdced363cd21250b55667b6dbef96c676d26fc (patch)
tree44f7e74fe5063f0e47b6c7a49ea33384134fd268
parent1321e6eaa73ec3d5015a58481091c3ea8019bb3e (diff)
mpegtsenc: prevent pcr_packet_period==0
a period of 1 is the smallest that makes sense Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavformat/mpegtsenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mpegtsenc.c b/libavformat/mpegtsenc.c
index fd30e7053f..3517d74830 100644
--- a/libavformat/mpegtsenc.c
+++ b/libavformat/mpegtsenc.c
@@ -659,6 +659,8 @@ static int mpegts_write_header(AVFormatContext *s)
service->pcr_packet_period =
pcr_st->codec->time_base.den/(10*pcr_st->codec->time_base.num);
}
+ if(!service->pcr_packet_period)
+ service->pcr_packet_period = 1;
}
// output a PCR as soon as possible