aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2012-10-27 16:56:37 +0200
committerLuca Barbato <lu_zero@gentoo.org>2012-10-29 10:52:13 +0100
commit07585ffa62eebebcd35326935fec7cd948021daf (patch)
tree13eed09fdd016b739d6a9d6cfae8c8e131426074
parentf174fbac3cb127273b8f3df8e05d7156ec1d7658 (diff)
downloadffmpeg-07585ffa62eebebcd35326935fec7cd948021daf.tar.gz
nutenc: verbosely report unsupported negative pts
Additionally use the correct error number.
-rw-r--r--libavformat/nutenc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c
index 581a202f11..e9e313bfe1 100644
--- a/libavformat/nutenc.c
+++ b/libavformat/nutenc.c
@@ -767,8 +767,12 @@ static int nut_write_packet(AVFormatContext *s, AVPacket *pkt)
int store_sp = 0;
int ret;
- if (pkt->pts < 0)
- return -1;
+ if (pkt->pts < 0) {
+ av_log(s, AV_LOG_ERROR,
+ "Negative pts not supported stream %d, pts %"PRId64"\n",
+ pkt->stream_index, pkt->pts);
+ return AVERROR_INVALIDDATA;
+ }
if (1LL << (20 + 3 * nut->header_count) <= avio_tell(bc))
write_headers(s, bc);