Commit graph

12 commits

Author SHA1 Message Date
Dan Willemsen
f197ccb756 Remove __DATE__/__TIME__ from Android builds
This removes unnecessary changes from build to build.

Bug: 24204119
Change-Id: I25258314fe56ea186d38d756fb5fb04aa689a812
2015-10-27 17:52:13 -07:00
Harish Mahendrakar
f377e8cb05 Decoder: Memset 8 extra bytes at the end of internal bitstream buffer
Decoder may read 8 extra bytes at the end of this buffer, though it will never be used
Setting it to zero will ensure unitialized reads are avoided

Change-Id: I724239861cb9fa64f3a70cb5450e094cb3afa20c
2015-10-09 15:49:32 +00:00
Harish Mahendrakar
3d9f217e4e Decoder: Exit gracefully in case of allocation failure
Skip error concealment when allocation fails for decoder buffers

Change-Id: I785f31cad5dca52c8c67cba78cdd330b7b4539e1
2015-10-09 01:02:36 +00:00
Harish Mahendrakar
39f8ae0a35 Decoder: Fixed an issue in handling flush
Fixed a NULL pointer reference, when flush is called before
decoding any pictures.

This was seen in following CTS test,
android.media.cts.DecoderTest#testCodecResetsH264WithSurface

Fixed code formatting issues in ih264d_set_flush_mode
Updated the testbench to call flush before decoding starts

Change-Id: Ib04e0b15573b2482c9d5b43c8bc7dd30d8f8efdd
2015-09-02 16:51:43 +05:30
Harish Mahendrakar
34b3e479f4 Decoder: Reduced memory requirements
Memory allocations are now done based on contents of SPS
API changed to move allocations inside the library

Also changed strlen to strnlen

Change-Id: I9130457f564cddb4da7ec6399cc9fe88ee871217
2015-08-04 17:50:14 +05:30
Hamsalekha S
90bd045476 Decoder: Fixed issues shown by Valgrind
The slice header structure has now been initialized to 0
Fixed bug in closing of threads in the case of error.

Change-Id: I777e0b73ad2f083c72be179984f5c1cb00ededb6
2015-07-29 16:15:30 +05:30
Martin Storsjo
cc87241e79 Don't declare variables after statements
This fixes building with compilers that are strict about the pre-C99
rule about having all variable declarations before statements.

Change-Id: I06dd0cc42a6dbe90025c3c913a0c8d9ffb0acbcb
2015-06-25 13:29:52 +03:00
Hamsalekha S
1f2d0129ef Improved error resilience in decoder
Fixed buffer management for error cases
Fixed end of picture detection logic for multiple slice error cases
Fixed handling of incomplete frame, missing slices.

Change-Id: Iae447667e4d88869a8bf992180cacd77870b9877
2015-06-24 20:39:37 +00:00
Martin Storsjo
c496bf45e0 Fix string handling for generating version strings
Don't do concatenation with strncat; the length parameter in strncat
is only for how many chars to append at most, not for the full output
buffer size. To safely use strncat, one would have to do
strncat(buf, str, sizeof(buf) - strlen(buf)).

By using snprintf, we guarantee that the buffer is null terminated, and
we don't need to use strnlen at all.

(If compatibility with older MSVC versions that lack snprintf, one
can use _snprintf instead and manually add the null termination.)

Change-Id: I1c2322c7a406ddd5e6551a96c460da60deeffda1
2015-06-18 12:12:47 +03:00
Hamsalekha S
caab4fe068 Multithreading changes and better error resilience
Fixed the following bugs
Issue 21145276
Issue 21144884
Issue 21181133
Issue 21181134

Decoder now returns error if the level in stream is higher than level at init

Change-Id: I8892c62bd98f7854d046510330c05a1e9ca826b2
2015-05-19 17:38:02 +05:30
Lajos Molnar
cd9e51fc2b fix file permissions
Change-Id: Ia4f99d5b963acd8d8a1afc2fbdf06b122d898f63
2015-05-05 17:34:51 +00:00
Hamsalekha S
8d3d303c79 Initial version
Change-Id: I7efe9a589cd24edf86e8d086b40c27cbbf8b4017
2015-04-02 15:59:02 +05:30