Mercurial > libavformat.hg
changeset 3398:3fbe87561b73 libavformat
Check return of url_fseek in mpeg timestamp reading code.
Patch by Joakim elupus ecce se
author | benoit |
---|---|
date | Thu, 29 May 2008 09:50:17 +0000 |
parents | 76918939de90 |
children | d280eb6ace33 |
files | mpeg.c |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mpeg.c Thu May 29 00:58:41 2008 +0000 +++ b/mpeg.c Thu May 29 09:50:17 2008 +0000 @@ -557,7 +557,9 @@ #ifdef DEBUG_SEEK printf("read_dts: pos=0x%"PRIx64" next=%d -> ", pos, find_next); #endif - url_fseek(s->pb, pos, SEEK_SET); + if (url_fseek(s->pb, pos, SEEK_SET) < 0) + return AV_NOPTS_VALUE; + for(;;) { len = mpegps_read_pes_header(s, &pos, &startcode, &pts, &dts); if (len < 0) {