mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-28 11:55:39 +00:00
decoder: fix video codec frame number in standalone mode.
Set a valid GstVideoCodecFrame.system_frame_number when decoding a stream in standalone mode. While we are at it, improve the debugging messages to also include that frame number.
This commit is contained in:
parent
0e8afe1c22
commit
387371b19f
2 changed files with 6 additions and 4 deletions
|
@ -315,6 +315,7 @@ decode_step(GstVaapiDecoder *decoder)
|
|||
if (!ps->current_frame)
|
||||
return GST_VAAPI_DECODER_STATUS_ERROR_ALLOCATION_FAILED;
|
||||
ps->current_frame->ref_count = 1;
|
||||
ps->current_frame->system_frame_number = ps->current_frame_number++;
|
||||
}
|
||||
|
||||
status = do_parse(decoder, ps->current_frame, ps->input_adapter,
|
||||
|
@ -373,8 +374,8 @@ push_frame(GstVaapiDecoder *decoder, GstVideoCodecFrame *frame)
|
|||
{
|
||||
GstVaapiSurfaceProxy * const proxy = frame->user_data;
|
||||
|
||||
GST_DEBUG("queue decoded surface %" GST_VAAPI_ID_FORMAT,
|
||||
GST_VAAPI_ID_ARGS(GST_VAAPI_SURFACE_PROXY_SURFACE_ID(proxy)));
|
||||
GST_DEBUG("push frame %d (surface 0x%08x)", frame->system_frame_number,
|
||||
GST_VAAPI_SURFACE_PROXY_SURFACE_ID(proxy));
|
||||
|
||||
g_async_queue_push(decoder->frames, gst_video_codec_frame_ref(frame));
|
||||
}
|
||||
|
@ -393,8 +394,8 @@ pop_frame(GstVaapiDecoder *decoder, guint64 timeout)
|
|||
return NULL;
|
||||
|
||||
proxy = frame->user_data;
|
||||
GST_DEBUG("dequeue decoded surface %" GST_VAAPI_ID_FORMAT,
|
||||
GST_VAAPI_ID_ARGS(gst_vaapi_surface_proxy_get_surface_id(proxy)));
|
||||
GST_DEBUG("pop frame %d (surface 0x%08x)", frame->system_frame_number,
|
||||
proxy ? GST_VAAPI_SURFACE_PROXY_SURFACE_ID(proxy) : VA_INVALID_ID);
|
||||
|
||||
return frame;
|
||||
}
|
||||
|
|
|
@ -168,6 +168,7 @@ typedef enum {
|
|||
typedef struct _GstVaapiParserState GstVaapiParserState;
|
||||
struct _GstVaapiParserState {
|
||||
GstVideoCodecFrame *current_frame;
|
||||
guint32 current_frame_number;
|
||||
GstAdapter *current_adapter;
|
||||
GstAdapter *input_adapter;
|
||||
gint input_offset1;
|
||||
|
|
Loading…
Reference in a new issue