goto open_failed;
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
- GST_VIDEO_DECODER_STREAM_LOCK (decoder);
- gst_video_decoder_reset (decoder, TRUE);
- GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
-
/* Initialize device/library if needed */
if (decoder_class->start && !decoder_class->start (decoder))
goto start_failed;
+ GST_VIDEO_DECODER_STREAM_LOCK (decoder);
+ gst_video_decoder_reset (decoder, TRUE);
+ GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
break;
default:
break;
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
- if (decoder_class->stop && !decoder_class->stop (decoder))
- goto stop_failed;
-
GST_VIDEO_DECODER_STREAM_LOCK (decoder);
gst_video_decoder_reset (decoder, TRUE);
GST_VIDEO_DECODER_STREAM_UNLOCK (decoder);
+ if (decoder_class->stop && !decoder_class->stop (decoder))
+ goto stop_failed;
break;
case GST_STATE_CHANGE_READY_TO_NULL:
/* close device/library if needed */
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
/* Initialize device/library if needed */
+ if (encoder_class->start && !encoder_class->start (encoder))
+ goto start_failed;
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
gst_video_encoder_reset (encoder, TRUE);
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
- if (encoder_class->start && !encoder_class->start (encoder))
- goto start_failed;
break;
default:
break;
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
- if (encoder_class->stop && !encoder_class->stop (encoder))
- goto stop_failed;
GST_VIDEO_ENCODER_STREAM_LOCK (encoder);
gst_video_encoder_reset (encoder, TRUE);
GST_VIDEO_ENCODER_STREAM_UNLOCK (encoder);
+ if (encoder_class->stop && !encoder_class->stop (encoder))
+ goto stop_failed;
break;
case GST_STATE_CHANGE_READY_TO_NULL:
/* close device/library if needed */