Re #1219: Removed decoded buffer size validation before decoding process itself, as the decoded buffer size requirement will be known after successful decoding.



git-svn-id: https://svn.pjsip.org/repos/pjproject/branches/projects/2.0-dev@3562 74dad513-b988-da41-8d7b-12977e46ad98
diff --git a/pjmedia/src/pjmedia-codec/ffmpeg_codecs.c b/pjmedia/src/pjmedia-codec/ffmpeg_codecs.c
index 8f1bcd0..ea7e809 100644
--- a/pjmedia/src/pjmedia-codec/ffmpeg_codecs.c
+++ b/pjmedia/src/pjmedia-codec/ffmpeg_codecs.c
@@ -1320,6 +1320,8 @@
     output->bit_info = 0;
 
     /* Validate output buffer size */
+    // Do this validation later after getting decoding result, where the real
+    // decoded size will be assured.
     if (ff->dec_vafp.framebytes > output_buf_len)
 	return PJ_ETOOSMALL;
 
@@ -1405,7 +1407,7 @@
 	    output->bit_info = PJMEDIA_VID_CODEC_EVENT_FMT_CHANGED;
 	}
 
-	/* Check provided buffer size after format changed */
+	/* Check provided buffer size */
 	if (vafp->framebytes > output_buf_len)
 	    return PJ_ETOOSMALL;