applemedia: vtdec: make jpeg decoding actually work
This commit is contained in:
parent
1cd62000f5
commit
938ce6a23d
@ -188,6 +188,9 @@ gst_vtdec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (vtdec->session)
|
||||||
|
gst_vtdec_invalidate_session (vtdec);
|
||||||
|
|
||||||
vtdec->reorder_queue_frame_delay = 0;
|
vtdec->reorder_queue_frame_delay = 0;
|
||||||
|
|
||||||
if (!strcmp (caps_name, "video/x-h264")) {
|
if (!strcmp (caps_name, "video/x-h264")) {
|
||||||
@ -208,9 +211,6 @@ gst_vtdec_set_format (GstVideoDecoder * decoder, GstVideoCodecState * state)
|
|||||||
format_description = create_format_description (vtdec, cm_format);
|
format_description = create_format_description (vtdec, cm_format);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (vtdec->session)
|
|
||||||
gst_vtdec_invalidate_session (vtdec);
|
|
||||||
|
|
||||||
if (vtdec->format_description)
|
if (vtdec->format_description)
|
||||||
CFRelease (vtdec->format_description);
|
CFRelease (vtdec->format_description);
|
||||||
vtdec->format_description = format_description;
|
vtdec->format_description = format_description;
|
||||||
@ -346,7 +346,16 @@ gst_vtdec_invalidate_session (GstVtdec * vtdec)
|
|||||||
static CMFormatDescriptionRef
|
static CMFormatDescriptionRef
|
||||||
create_format_description (GstVtdec * vtdec, CMVideoCodecType cm_format)
|
create_format_description (GstVtdec * vtdec, CMVideoCodecType cm_format)
|
||||||
{
|
{
|
||||||
return NULL;
|
OSStatus status;
|
||||||
|
CMFormatDescriptionRef format_description;
|
||||||
|
|
||||||
|
status = CMVideoFormatDescriptionCreate (NULL,
|
||||||
|
cm_format, vtdec->video_info.width, vtdec->video_info.height,
|
||||||
|
NULL, &format_description);
|
||||||
|
if (status != noErr)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
return format_description;
|
||||||
}
|
}
|
||||||
|
|
||||||
static CMFormatDescriptionRef
|
static CMFormatDescriptionRef
|
||||||
|
Loading…
x
Reference in New Issue
Block a user