Re #1182:
- Fixed ffmpeg codec: decoding buffer size check (should not use assertion), reset output bit_info before decoding, removed unused code of auto resize when decoder output size changed.
- Fixed bug in sdl_factory_default_param() of sdl_dev.c in device direction check.
- Fixed compile errors sample app vid_streamutil.c of bad local variable definiton.
- Updated sample app vid_streamutil.c default renderer size to 640 x 480.
git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3432 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjmedia/src/pjmedia-videodev/sdl_dev.c b/pjmedia/src/pjmedia-videodev/sdl_dev.c
index 4ac6b14..ac8c7db 100644
--- a/pjmedia/src/pjmedia-videodev/sdl_dev.c
+++ b/pjmedia/src/pjmedia-videodev/sdl_dev.c
@@ -280,7 +280,7 @@
PJ_UNUSED_ARG(pool);
pj_bzero(param, sizeof(*param));
- if (di->info.dir & PJMEDIA_DIR_CAPTURE_RENDER) {
+ if (di->info.dir == PJMEDIA_DIR_CAPTURE_RENDER) {
param->dir = PJMEDIA_DIR_CAPTURE_RENDER;
param->cap_id = index;
param->rend_id = index;
@@ -750,6 +750,9 @@
goto on_return;
}
+ if (frame->size==0 || frame->buf==NULL)
+ goto on_return;
+
if (stream->surf) {
if (SDL_MUSTLOCK(stream->surf)) {
if (SDL_LockSurface(stream->surf) < 0) {