}
/* **************************************** */
+// ?useful?
JNIEXPORT void JNICALL Java_au_notzed_jjmpeg_AVFrame_copy
(JNIEnv *env, jobject jdst, jobject jsrc) {
AVFrame *dst = NativeZ_getP(env, jdst);
int res;
res = DLCALL(av_frame_copy)(dst, src);
- // FIXME: this is not an i/o error
if (res < 0)
- jjthrowAVIOException(env, res, "Frame copy failed");
+ nativez_ThrowOutOfMemoryError(env, "Copy frame");
}
+// ?useful?
JNIEXPORT void JNICALL Java_au_notzed_jjmpeg_AVFrame_copyProperties
(JNIEnv *env, jobject jdst, jobject jsrc) {
AVFrame *dst = NativeZ_getP(env, jdst);
int res;
res = DLCALL(av_frame_copy_props)(dst, src);
- // FIXME: this is not an i/o error
if (res < 0)
- jjthrowAVIOException(env, res, "Frame properties copy failed");
+ nativez_ThrowOutOfMemoryError(env, "Copy frame");
}
+JNIEXPORT void JNICALL Java_au_notzed_jjmpeg_AVFrame_ref
+(JNIEnv *env, jobject jdst, jobject jsrc) {
+ AVFrame *dst = NativeZ_getP(env, jdst);
+ AVFrame *src = NativeZ_getP(env, jsrc);
+ int res;
+
+ res = DLCALL(av_frame_ref)(dst, src);
+ if (res < 0)
+ nativez_ThrowOutOfMemoryError(env, "Copy frame");
+}
+
+JNIEXPORT void JNICALL Java_au_notzed_jjmpeg_AVFrame_unref
+(JNIEnv *env, jobject jo) {
+ AVFrame *frame = NativeZ_getP(env, jo);
+
+ DLCALL(av_frame_unref)(frame);
+}
/* ********************************************************************** */
/* FrameReader */