diff options
Diffstat (limited to 'pjmedia/src/test/rtp_test.c')
-rw-r--r-- | pjmedia/src/test/rtp_test.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pjmedia/src/test/rtp_test.c b/pjmedia/src/test/rtp_test.c index c4a4e924..2a62520c 100644 --- a/pjmedia/src/test/rtp_test.c +++ b/pjmedia/src/test/rtp_test.c @@ -32,7 +32,10 @@ int rtp_test() pjmedia_rtp_session_init (&rtp, 4, 0x12345678); pjmedia_rtp_encode_rtp (&rtp, 4, 0, 0, 160, &rtphdr, &hdrlen); - fwrite (rtphdr, hdrlen, 1, fhnd); + if (fwrite (rtphdr, hdrlen, 1, fhnd) != 1) { + fclose(fhnd); + return -1; + } fclose(fhnd); return 0; } |