When v4l2sink goes to PAUSED->READY it only stops streaming, so the state
should be set to STATE_PENDING_STREAMON in case the element transitions
back to PLAYING.
if (!gst_v4l2_object_stop_streaming (v4l2sink->v4l2object)) {
return GST_STATE_CHANGE_FAILURE;
}
- v4l2sink->state = STATE_OFF;
+ v4l2sink->state = STATE_PENDING_STREAMON;
}
break;
case GST_STATE_CHANGE_READY_TO_NULL:
/* close the device */
if (!gst_v4l2_object_stop (v4l2sink->v4l2object))
return GST_STATE_CHANGE_FAILURE;
+ v4l2sink->state = STATE_OFF;
break;
default:
break;