diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2012-07-08 13:43:47 +0200 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2012-07-08 17:08:56 +0200 |
commit | b010d9b58651379883b42e58494aaefbab4df648 (patch) | |
tree | 58de725f591232b47596a08787b873168452bb00 /libavformat/nutenc.c | |
parent | bba819bd8fb7a3103a9901463c47144855a34f70 (diff) | |
download | ffmpeg-b010d9b58651379883b42e58494aaefbab4df648.tar.gz |
lavf/nutenc: provide meaningful error message and error code in case of invalid pts
Diffstat (limited to 'libavformat/nutenc.c')
-rw-r--r-- | libavformat/nutenc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libavformat/nutenc.c b/libavformat/nutenc.c index bd10b2965b..fd7768a628 100644 --- a/libavformat/nutenc.c +++ b/libavformat/nutenc.c @@ -704,8 +704,10 @@ 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, "Invalid negative packet pts %"PRId64" in input\n", pkt->pts); + return AVERROR(EINVAL); + } if(1LL<<(20+3*nut->header_count) <= avio_tell(bc)) write_headers(s, bc); |